8000 don't validate hidden fields · Issue #189 · jquery-validation/jquery-validation · GitHub
[go: up one dir, main page]

Skip to content
don't validate hidden fields #189
Open
@duduribeiro

Description

@duduribeiro

Hi, i change the function:

elements: function() {
            var validator = this,
                rulesCache = {};

            // select all valid inputs inside the form (no submit or reset buttons)
            return $(this.currentForm)
            .find("input, select, textarea")
            .not(":submit, :reset, :image, [disabled]")

to:

            .not(":submit, :reset, :image, [disabled], :hidden")

to not validate hidden fields.. (in my case, sometimes a field will be hidden in the submit).

is this a valid change to the project?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0