|
|
@ -158,12 +158,12 @@ $.fn.form = function(fields, parameters) { |
|
|
|
$field = $(this), |
|
|
|
$fieldGroup = $field.closest($group) |
|
|
|
; |
|
|
|
if( $fieldGroup.hasClass(className.error) ) { |
|
|
|
module.debug('Revalidating field', $field, module.get.validation($field)); |
|
|
|
module.validate.field( module.get.validation($field) ); |
|
|
|
} |
|
|
|
else if(settings.on == 'change') { |
|
|
|
module.validate.field( module.get.validation($field) ); |
|
|
|
if(settings.on == 'change' || ( $fieldGroup.hasClass(className.error) && settings.revalidate) ) { |
|
|
|
clearTimeout(module.timer); |
|
|
|
module.timer = setTimeout(function() { |
|
|
|
module.debug('Revalidating field', $field, module.get.validation($field)); |
|
|
|
module.validate.field( module.get.validation($field) ); |
|
|
|
}, settings.delay); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -574,6 +574,9 @@ $.fn.form.settings = { |
|
|
|
on : 'submit', |
|
|
|
inline : false, |
|
|
|
|
|
|
|
delay : 200, |
|
|
|
revalidate : true, |
|
|
|
|
|
|
|
transition : 'scale', |
|
|
|
duration : 150, |
|
|
|
|
|
|
@ -609,7 +612,6 @@ $.fn.form.settings = { |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
templates: { |
|
|
|
error: function(errors) { |
|
|
|
var |
|
|
|