-
Notifications
You must be signed in to change notification settings - Fork 44
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
angela - backtrek - pipes #32
base: master
Are you sure you want to change the base?
Conversation
BackTREKWhat We're Looking For
|
} | ||
|
||
if (!attributes.email) { | ||
errors.weeks = ['cannot be blank']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weeks for the reservation?
tripData[field] = value; | ||
} | ||
|
||
$inputElement.val(''); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider this scenario:
1). I click on a trip, great the form shows up.
2). forget to put in my email address before hitting submit, I get a validation error message, great
3). I notice the fields have their values blanked, also ok as I can reenter them (just annoying), but the hidden tripId field is also blanked now the submission fails.
A better time to do this is after a successful save, just make a helper to blank the form and call it after a successful save.
BackTREK
Congratulations! You're submitting your assignment!
Comprehension Questions