Open
Conversation
… details properly.
…ey are clicked on when sorting.
…othing but parsing errors.
…eating a reservation.
…on the idea of initializing...
… the life of me get any messages to be cooperative so all my users will have to use the console.
BackTREKWhat We're Looking For
|
CheezItMan
reviewed
Dec 5, 2017
| }); | ||
| } else { | ||
| console.log('Trip is invalid, sad trombone.'); | ||
| console.log(trip.validationError); |
There was a problem hiding this comment.
It's good that you're checking validation errors, but this needs to be reported to the user as well.
| $('#status-messages ul').empty(); | ||
| console.log(response.responseJSON.errors); | ||
|
|
||
| for(let key in response.responseJSON.errors) { |
There was a problem hiding this comment.
Good, good to use for letting the user know the validation error issues.
|
|
||
| <form id="reservation-trip-form" method="post"> | ||
| <label for="name">Full Name</label> | ||
| <input type="text" name="name"></input> |
There was a problem hiding this comment.
This isn't being selected by app.js Because it's having trouble with $('input[name="name"]') Instead an alternative way of being selected would be appropriate, an id etc.
| event.preventDefault(); | ||
| const tripData = {}; | ||
| fields.forEach( (field) => { | ||
| const val = $(`input[name=${field}]`).val(); |
There was a problem hiding this comment.
This isn't working for the name field.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BackTREK
Congratulations! You're submitting your assignment!
Comprehension Questions