Skip to content

Function for custom event doesn't work #147

@isabelle112

Description

@isabelle112

Hi,

I am using the bundle for validating my symfony form. Everything works fine but now I need to validate at a custom event. I've tried to use the code from the readme file number 12, but I get the error, that

$('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'); }} }); this part of the code "is not a function". if I remove the last part from jsFormValidator({... I don't get an error.

Could you please help me, where the issue is?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions