Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If an input is not in a form-group and it valid, exception gets thrown #56

Closed
NYPD opened this issue Feb 25, 2017 · 0 comments
Closed
Assignees
Labels
Milestone

Comments

@NYPD
Copy link
Owner

NYPD commented Feb 25, 2017

  var errorElement = useBootstrap3Stlying ? _getClosestParentByClass(element, 'form-group') : element;

  var isInvalid = element.getAttribute('data-invalid') === 'true';

  if (isInvalid)
    errorElement.classList.add('has-error');
  else
    errorElement.classList.remove('has-error');

errorElement will be null therefore not be able read the property classList of null.

So basically if it can not find the form-group, use the element itself

@NYPD NYPD added the bug label Feb 25, 2017
@NYPD NYPD self-assigned this Feb 25, 2017
@NYPD NYPD modified the milestone: v1.1.1 Feb 25, 2017
NYPD added a commit that referenced this issue Feb 25, 2017
@NYPD NYPD closed this as completed Feb 25, 2017
@NYPD NYPD mentioned this issue Feb 25, 2017
NYPD added a commit that referenced this issue Feb 25, 2017
* Fixes #57

* Closes #56

* Updates package to 1.1.1 and grunt build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant