dilvie/h5Validate — Issue #28: Use with AJAX Form Submission
Author: Bucs
Created: 2011-12-12 05:00:51+00:00
State: open

It would be nice to see an example of how this plugin can be used when you want to validate a form prior to performing an AJAX form submission (i.e. not doing a submit). The only way I get this to remotely work is to do the following:

1) Enter all field values first
2) Then call the $('#myform').h5Validate() upon the "checkout" button click
3) Then call if ($('#myform').h5Validate('allValid')) { ... }

If I try to first call the $('#myform').h5Validate() upon form initialization then call the 'allValid' upon checkout button click...the 'allValid' call seems to work but it does not implement the default invalid CSS for the invalid fields.

What am I doing wrong here?