JaysGitLab / cs5667-final-project-revdev

cs5667-final-project-revdev created by GitHub Classroom
MIT License
1 stars 0 forks source link

Date validation #50

Closed haietza closed 6 years ago

haietza commented 6 years ago

Resolves #42.

I got date validation for the max number of days for the event ref'd in the reservation working. It has to be in the controller as middleware in order to get the value from the Event table to be used in the validation function for the reservation.

haietza commented 6 years ago

Fixing error passing ... will push when resolved.

haietza commented 6 years ago

@rivendell10 Instead of passing the err to the next middleware, it looks like it works better to just handle the error when it occurs with the res.redirect and flash message. This should be working now.