Run Javascript if Validators passed

Run Javascript if Validators passed

  
Hey, all!

Can anyone tell me how can I run a Javascript function only if the validators on the page successfully passed? Which is the javascript function or variable I should be testing for true?

Best regards,
Pedro Magalhães