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

Bootstrap 5.x form validation classes are not applied/displayed #364

Closed
joostdebruijn opened this issue May 2, 2022 · 4 comments
Closed
Labels
bug Something isn't working

Comments

@joostdebruijn
Copy link

joostdebruijn commented May 2, 2022

Describe the bug
For Bootstrap 5.x, the form validation classes are not applied as described here: https://getbootstrap.com/docs/5.1/forms/validation.

To Reproduce

  1. Create a form which supports the custom validation classes as described here: https://getbootstrap.com/docs/5.1/forms/validation/#custom-styles.
  2. Make a required TomSelect.
  3. Submit the form without entering something in the required select.
  4. The select will not marked as invalid.

Expected behavior
I expect the is-valid / is-invalid will be applied and displayed correctly.

Additional context
Add any other context about the problem here.

  • OS: Windows 11 (22000.651)
  • Browser Chrome 100.0.4896.127
  • Version: tom-select v2.0.1
  • Device: Desktop
@joostdebruijn joostdebruijn added the bug Something isn't working label May 2, 2022
@oyejorge
Copy link
Member

oyejorge commented May 3, 2022

Create a form which supports the custom validation classes as described here: https://getbootstrap.com/docs/5.1/forms/validation/#custom-styles.

Anyone care to create an exmple on jsfiddle or similar?

@oyejorge oyejorge added the awaiting more info The issue could be more clearly described label May 3, 2022
@joostdebruijn
Copy link
Author

Sure, will do!

@joostdebruijn
Copy link
Author

joostdebruijn commented May 3, 2022

@oyejorge I've created one here: https://jsfiddle.net/vdw9oy5u. If you submit the form (without selecting something), you'll see the difference between a validated native select and a validated TomSelect with Bootstrap 5 styling. Let me know, if I can help you with more information.

Validation error:
image

Validation ok:
image

@oyejorge
Copy link
Member

oyejorge commented May 3, 2022

That was fast, thanks!

@oyejorge oyejorge removed the awaiting more info The issue could be more clearly described label May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants