As a restaurant manager
I only want to allow reservations to be created during business hours, up to 60 minutes before closing
so that users do not accidentally create a reservation for a time we cannot accommodate.
Acceptance criteria
1 The /reservations/new page will display an error message with className="alert alert-danger", if any of the following additional constraints are violated:
The reservation time is before 10:30 AM.
The reservation time is after 9:30 PM, because the restaurant closes at 10:30 PM and the customer needs to have time to enjoy their meal.
The reservation date and time combination is in the past. Only future reservations are allowed. E.g., if it is noon, only allow reservations starting after noon today.
2 The /reservations API will have the same validations as above and will return 400, along with an informative error message, when a validation error happens.
As a restaurant manager I only want to allow reservations to be created during business hours, up to 60 minutes before closing so that users do not accidentally create a reservation for a time we cannot accommodate.
Acceptance criteria
1 The /reservations/new page will display an error message with className="alert alert-danger", if any of the following additional constraints are violated:
2 The /reservations API will have the same validations as above and will return 400, along with an informative error message, when a validation error happens.