Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Selectize 12.2-13.3 does not support Foundation 6 Abide validation #1724

amygilbert started this conversation in Ideas
Discussion options

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:

  1. Link to Foundation 6.6.3 js (the latest)
    https://cdnjs.cloudflare.com/ajax/libs/foundation/6.6.3/js/foundation.min.js
  2. Link to any Selectize js later than 12.3
  3. Create a form with a select field and selectize it. The first option should have value="".
  4. Add the required property to the field
  5. Put the Foundation Abide data-abide attribute on the form element.
  6. Put novalidate on the form element to disable browser validation
  7. 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.

You must be logged in to vote

Replies: 2 comments

Comment options

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

You must be logged in to vote
0 replies
Comment options

Re-opening; Thanks for the great write-up and examples. I don't personally use foundation, but can take a look

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
pending review This issue was closed as stale; since then additional review has been requested.
Converted from issue

This discussion was converted from issue #1644 on January 12, 2022 12:07.

AltStyle によって変換されたページ (->オリジナル) /