Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure PantherIDs are validated for input #25

Open
sergiopantoja opened this issue Jun 27, 2013 · 0 comments
Open

Ensure PantherIDs are validated for input #25

sergiopantoja opened this issue Jun 27, 2013 · 0 comments
Assignees

Comments

@sergiopantoja
Copy link
Contributor

When adding a new ARCH project, Allen knew the student's name, but not her Panther ID. So he put "N/A" in that field. The form was validated and a new project was created.

First: ensure that our controller checks the Panther ID input (needs to be 7 digits, a string of numbers, etc.). Maybe even create a reusable ValidateService to inject into all controllers w/ forms.

Second: I'm sure there were errors thrown out into the Javascript console (e.g. Firebase won't create a new user location named "N/A" because it's not numeric), but this should have resulted in a visible error.

We can use deferred promises and Firebase's built-in error callbacks to check if a write was totally successful or not, and then use those callbacks to display a message to the user. Look for similar code in the soon-to-be-committed CommentService.js file.

@ghost ghost assigned sergiopantoja Jun 27, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant