-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make sure tags that mismatch pattern are not added #23
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Awesome; anything else that needs to happen before we merge? |
src/tags-input.js
Outdated
return false; | ||
} | ||
|
||
// Don't add if iti's invalid (eg, for pattern=) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found a typo, "iti's" should be "it's"
I think we're good, just didn't want to do it on a plane haha |
Awesome! Understandable 😄 |
Can we make a release for this? |
hmm there seems to be quite big fork in https://github.com/pirxpilot/tags-input |
@developit WTH... just do it already |
Fixes #20 and #21 to ensure that tags that don't get added if they mismatch with the pattern attribute.
This is just what @mikemaccana had but does not rely on include to ensure IE support. Got rid of the tilde trick and just check if
indexOf
is equal or greater than 0.Also added some styles to flash the input box to indicate that the content is invalid.