I have a form containing a lot of fields that all have some sort of validation. Two fields however are special: a date field and a time field. Their validation states that their combined date/time value is a timestamp somewhere in the future. I use the jQuery validation plugin plus its extra functions to do the validation. Check out this fiddle to see a trimmed down version of what I have:
I have a couple of problems:
I have tried to validate the other field using the technique described here : $(.. selector for the two fields...).valid()
, but due to a bug described in this comment in that post the other fields will no be validated anymore when I do that. I'm pretty much stuck... Any idea?
You can force (or clear) an error on any field programatically with the method .showErrors(errors)
(see documentation ).
This should help overcome both issues.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.