-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Selectize 12.2-13.3 does not support Foundation 6 Abide validation #1724
-
I did:
- Search for if my issue has already been submitted
- Make sure I'm reporting something precise that needs to be fixed
- Give my issue a descriptive and concise title
- Create a minimal working example on JsFiddle or Codepen
(or gave a link to a demo on the Selectize docs) - Indicate precise steps to reproduce in numbers and the result,
like below
Foundation 6 Abide validation library (https://get.foundation/sites/docs/abide.html) does not detect required empty selectize fields when using Selectize 12.3-13.3. Selectize 12.2 does work with Abide.
Steps to reproduce:
- Link to Foundation 6.6.3 js (the latest)
https://cdnjs.cloudflare.com/ajax/libs/foundation/6.6.3/js/foundation.min.js - Link to any Selectize js later than 12.3
- Create a form with a select field and selectize it. The first option should have value="".
- Add the required property to the field
- Put the Foundation Abide data-abide attribute on the form element.
- Put novalidate on the form element to disable browser validation
- For extra confirmation, you can add a div with the data attribute data-abide-error and style="display: none;". This will change to display: block when an invalid field is detected.
Expected result:
When you click submit without entering anything in the selectize field, the form should not submit and the data-abide-error div should display.
CodePen using Selectize 12.2 works: https://codepen.io/amygilbert/pen/qBmrLOm
Actual result:
The form submits with the empty required selectize field.
CodePen using Selectize 13.3 (12.3 or later) does not work: https://codepen.io/amygilbert/pen/BaRWqpj
I see two Selectize 12.3 commits that have to do with validation that may have something to do with it:
629f7e6
0316d24
I am using Selectize 12.2 with one minor fix I did myself related to Issue 1191 so I understand if there's no time to fix this issue. There are likely few people who are using both of these code libraries.
And let me just add that I really appreciate that Selectize is still actively being developed. I looked into many different select plugins and this was by far the best. It's straight-forward, well-documented, and powerful. It does everything I need and more. Thanks you so much for you time and talent.
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 2 comments
-
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days
Beta Was this translation helpful? Give feedback.
All reactions
-
Re-opening; Thanks for the great write-up and examples. I don't personally use foundation, but can take a look
Beta Was this translation helpful? Give feedback.