i have a form with various elements and a file upload, sometimes the user has to wait for the upload to finish only to see he wrote something wrong(some element didn't pass validation).
Is it possible that if some validator fails on any element of the form, all other validation stops and the form returns immediately without waiting for the upload to finish ?
Yes, of course.
TRUE
as the second parameter when adding validators to a form, e.g. $element->addValidator('alnum', true)
. TRUE
means the form validation will immediately return.