Skip to content

Ajax Validation of a field not returning the correct state in jqv.field.result #608

@FHoulbreque

Description

@FHoulbreque

Hello,

I am making a new website (sorry, it's in french) and trying to use the AJAX validation stuff.

If the message and form validating are working perfectly, sadly, the field AJAX validation return a false value. This is an issue as long as I bound jqv.field.result to change fields class.

// JavaScript Document
$(function() {
    $('#formLogin').validationEngine({
        autoPositionUpdate:     true
    });
    $('#formLogin').bind('jqv.field.result', function(e, field, errorFound, promptText) {
        if(errorFound) {
            field.parents('.control-group').removeClass('success').addClass('error');
        } else {
            field.parents('.control-group').removeClass('error').addClass('success');
        }
    });
    $('#formLogin button:reset').click(function(e) {
        $('#formLogin .control-group').removeClass('error success');
        $('#formLogin').validationEngine('hideAll');
    });
});

If this is working perfectly on the password field, but on the email one, it is returning an error.

Maybe it's working as intended as I read it's "undefined" and not false but, I can't find a way to check if the AJAX field validation is done. So either it's a feature request or a bug correction.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions