Skip to content

Conversation

@traviskroberts
Copy link
Contributor

According to the HTML5 spec, the required attribute is a boolean attribute. Just having it present (even if it's value is "false") makes the element required. Most browsers will still work with the attribute set to false, but I've made a very small change to not add the attr at all if the original select does not have the required attribute. This should hopefully future-proof it in case browser's change their mind. I've only noticed IE8 marking the field as invalid even with required="false".

I've added some basic tests along with it, but if you need me to make them more robust, let me know.

@brianreavis brianreavis merged commit 816b527 into selectize:master Jun 1, 2014
brianreavis added a commit that referenced this pull request Jun 1, 2014
scarfacedeb pushed a commit to scarfacedeb/selectize.js that referenced this pull request Aug 27, 2014
* upstream/master: (69 commits)
  Released 0.11.0.
  Added "allowEmptyOption" option (selectize#163).
  Fixed broken bootstrap3 build.
  Fixing confusing description
  renamed the undefined plugins variable to selector_plugins
  Released 0.10.1.
  Bind createFilter callback to Selectize instance.
  Released 0.10.0.
  Calculate scrollbar width (fixes selectize#360).
  Fix for selectize#438 + tests.
  Added createFilter sample to contacts demo.
  Cherry picked commit 6e04d7b from selectize#370.
  Minor cleanup of selectize#405.
  Forgot self qualifier on
  Jquery cached data allocated by selectized is now cleaned up at destroy time
  Removing extra tabs
  selectized class should not have been added before the classes were checked and propegated to all of the controls created by selectize.  It was previously added after this initialization and is now also added at the same time.
  Used method call to isFull to avoid duplicate code
  Consolidated the refreshState call to capture just becoming full during bulk (or any) addItem call
  Delaying updating attributes and caret during bulk insertion
  ...

Conflicts:
	src/selectize.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants