foundation-rails
foundation-rails copied to clipboard
Request: Multiple Validation Rules with multiple error messages.
Sometimes we need complex business rules for validating logic.
For example, I have a case where i need to do validation between three time fields.
The start time can be later than the end time, the lunch length time cannot be larger than the difference between the start and end time and finally if the the start and end time are larger than 5 hours the lunch time must be 30 minutes.
I want to relay those messages back to my users for each instance they make a mistake like that.
what I want abide to be able to do is:
- Specify a list of validators
- For each validator have a specific message associated with its failure
- show the messages for all validators that have returned false.