Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

validateElement always returns null #288

Closed
ikonyshev opened this Issue Mar 2, 2012 · 1 comment

Comments

Projects
None yet
2 participants
      if (valid) {
        element.data('valid', null);
        element.trigger('element:validate:pass');
      }
    }
    element.trigger('element:validate:after');
    return (_ref = element.data('valid') === false) != null ? _ref : {
      "false": true
    };

Seems it never returns true.
If validation passed we have element.data('valid') set to null, so its comparison to false is always false, so _ref gets false value

Contributor

bcardarella commented Jul 9, 2012

The JavaScript public API is pretty crappy. I plan on a re-write for 4.0

@bcardarella bcardarella closed this Jul 9, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment