Skip to content

formGroup now use the correct class name for error when looking for them #519

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

Merged

Conversation

lionel-bijaoui
Copy link
Member

@lionel-bijaoui lionel-bijaoui commented Oct 16, 2018

  • Please check if the PR fulfills these requirements
  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

Bug fix

  • What is the current behavior? (You can also link to an open issue here)

form-group listen for "field-validated" to trigger a search in their DOM childrens for element with a class of ".form-element.error".
If they find some, they apply an error class. If not, they add a validation class.
This is a very basic system to detect error in the children of groups (PR welcome if you have an idea to improve this without it being too costly).
The problem is that the error class can be customize with the option validationErrorClass.
The current querySelector doen't take this into account.
If you changed validationErrorClass, this basic verification system would break and show validation everytime, regardless of the content and state of the children of the group.

  • What is the new behavior (if this is a feature change)?

It now use validationErrorClass to get the error class name.

  • Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

No

  • Other information:

@zoul0813
Copy link
Member

looks good to me

@lionel-bijaoui lionel-bijaoui merged commit 04460af into vue-generators:v3 Oct 17, 2018
@lionel-bijaoui lionel-bijaoui deleted the lb_fix_class_error_group branch October 17, 2018 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants