You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Still allows data that doesn't start with a hash to be entered. The docs mention HTML5 pattern support - should we use pattern to limit the input or should we do this via change events?
The text was updated successfully, but these errors were encountered:
@mikemaccana Looks like there were actually a few copies of tags-input.js on that page and the one being used didn't have a placeholder defined. I've modified it to just use one copy. Also the placeholder attribute is a pre-anchored regex, so the pattern was invalid. Here's an example with a valid placeholder and some CSS to show validation state:
However, you're right - the field gets marked as invalid like we would expect, but tags-input doesn't care and happily adds the tag. The fix here should be pretty simple - we need to have the method that commits a tag from the input field first check that input.validity.valid is true.
See jsfiddle at http://jsfiddle.net/d5w4jpxq/71/ :
<input name="hashtags" type="tags" pattern="^#" placeholder="#hashtags">
Still allows data that doesn't start with a hash to be entered. The docs mention HTML5 pattern support - should we use
pattern
to limit the input or should we do this viachange
events?The text was updated successfully, but these errors were encountered: