Is there a way to trigger client side form validation on link click?
I have a from with one standard non ajax submit button, and one ajax link.
Submit button does what submit button does normaly. Sends data to a controllerAction1 that does server side validation, does some math on data and returns result.
Ajax link gathers form data and sends it to controllerAction2 that does server side validation and saves data to database.
Whole server side magic is working fine, but what i can’t figure out (and i’m googleing for 2 days now) is how to trigger client side validation when ajax link is clicked.
I tried using “yiiActiveForm(‘validate’)” in js but it is not triggering anything.
Only thing that triggers validation is “yiiActiveForm(‘submitForm’)” which works fine when form data is not good, but once it’s good (passes valdiation), form gets submited (like you clicked on submit button) which i don+t want…