-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Description
Symfony 2.4.8
$('form')
.find('input[type=text], textarea')
.blur(function(){
// Run validation for this field
$(this).jsFormValidator('validate')
})
.focus(function() {
// Reset markers when focus on a field
$(this).removeClass('error');
$(this).removeClass('ready');
})
.jsFormValidator({
'showErrors': function(errors) {
if (errors.length) {
$(this).removeClass('ready');
$(this).addClass('error');
} else {
$(this).removeClass('error');
$(this).addClass('ready');
}
}
});
Error appears when I try to validate form on a custom event based on here
https://github.com/formapro/JsFormValidatorBundle/blob/master/Resources/doc/3_12.md
Form elements generated manually, tried to generate form elements by {{ form(form) }} still the same error.
Everything works fine when I submit the form. But I want to validate form field when the value is changed to show whether it is correct value or not.
What can be the issue?