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
V5 form validations #30170
V5 form validations #30170
Conversation
So with this change, there is no built-in and functional form validation in Bootstrap? Because everything would need to be controlled by another JS library or framework? |
Does not deny the creation of new built-in JavaScript plugins. We can consider it after the alpha release. At least, the current control by sibling selectors should be abolished. |
Just keep in mind there's one snippet using inline JS to handle validation. If it's supposed just to be an example we should make it so, because currently it applies to the code. |
bc9da6c
to
54f1214
Compare
I rebased into the master and updated the first custom JS example. |
Any chance this could be rebased @ysds? |
54f1214
to
754362e
Compare
I don't want to hurry this @mdo. The tooltip example doesn't look right, the feeback is always shown. |
Sorry for being away for a while.
It's intentional that the feedback tooltip examples are always visible, but what do you think it should be? |
I thought it was a mistake since previously they didn't show up nor in v4. If it's intentional then all good :) |
👍 As commented on #30170 (comment), additional JS is required to toggle the display of feedback messages. I think the static sample is enough for now. |
@ysds Can you confirm something here before I attempt to resolve conflicts and merge this? Are we removing all feedback elements from the examples under the |
Hoping this can be replaced by #31666. |
Closing as out of date—miss you @ysds! <3 |
Drop feedback messages by sibling selector for V5.
There is no way to solve the #25110 and #29439 maintaining the current specification. If you are using a modern JavaScript framework, this removal of sibling selectors is not a problem, because feedback messages are almost always controlled by
if
directives (e.g.ng-if
). Control styling with the.is-valid/.is-invalid
has the same feature as v4.Also this close #28414 and #30438.
Preview: https://deploy-preview-30170--twbs-bootstrap.netlify.app/docs/5.0/forms/validation/
PR for v4 is #30180