Mats A

Mats A

  • NA
  • 59
  • 28.7k

Validation client side, several fields

Sep 21 2011 3:00 PM
I have an form where the user fills out values for each day of the week. For each day there is two textboxes, one for a a startvalue (time) and one for a stopvalue (time). So the user is expected to fill out values like "09:00" and "10:00" for each day.

The validation:
Validate that the textboxes contains valid "time" values.
Validate that one of the boxes contains a "time" value later than the other.

There is one submit button for the whole week, so by clicking the button 14 textboxes are validated and for each day the values are compared together to ensure one is later than the other.

Is there any way to do this clientside, by just having one warning message per day?



Answers (3)