Skip to content

Uncaught TypeError: Cannot read property 'transformers' of undefined fp_js_validator.js:536 #51

@latysh

Description

@latysh

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions