Skip to content

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

@amygilbert

Description

@amygilbert

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.

Metadata

Metadata

Assignees

Labels

pending reviewThis issue was closed as stale; since then additional review has been requested.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions