Skip to content

Issue in function staticRules #1076

Closed
Closed
@evaristovidal

Description

@evaristovidal

In every new version I have to update my file, and again in v1.12.0, to check that validator has settings and validator.settings has rules. This is my updated function,

staticRules: function (element) {
    var rules = {},
    validator = $.data(element.form, "validator");

    if (validator && validator.settings && validator.settings.rules) {
    // if (validator.settings.rules) {
        rules = $.validator.normalizeRule(validator.settings.rules[element.name]) || {};
    }
    return rules;
},

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions