8000 Error when a form hold an iframe and the iframe holds another form · Issue #917 · jquery-validation/jquery-validation · GitHub
[go: up one dir, main page]

Skip to content
Error when a form hold an iframe and the iframe holds another form #917
Closed
@acarlstein

Description

@acarlstein

Do old browsers, I used an iframe which holds a form so I give the illusion to the user that the file was uploaded without refreshing the screen.
If this iframe is inside the main form where the rest of the information reside, when I submit this form validate breaks on the line "validator.settings.rules".
For some reason, it is detecting a nested form when it shouldn't since the second form is inside a iframe in a separate page.

Here is the whole function where it breaks.

staticRules: function( element ) {
  var rules = {};
  var validator = $.data(element.form, "validator");
  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

      0