cucuru cucuru - 1 year ago 100
jQuery Question

jQuery Validate, how to know when it's valid?

I have a form, and I would like to know if it validates while not submitting it. I need the value.

var validation = $(idFormulario).validate({
errorClass: 'jqInvalid',
errorPlacement: function (error, element) {
return false;
success: function(e){
return false; //not submit

It doesn't work. How can I check if form is valid?

Answer Source

As mentioned in the above comment you've to use valid().

Description: valid() Checks whether the selected form is valid or whether all selected elements are valid.

Example :


Hope this helps.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download