Skip to content

Make sure tags that mismatch pattern are not added - #23

Open
thomasdegry wants to merge 3 commits into
developit:masterfrom
thomasdegry:master
Open

Make sure tags that mismatch pattern are not added#23
thomasdegry wants to merge 3 commits into
developit:masterfrom
thomasdegry:master

Conversation

@thomasdegry

Copy link
Copy Markdown

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.

@developitdevelopit left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@thomasdegry

Copy link
Copy Markdown
Author

Awesome; anything else that needs to happen before we merge?

Comment threadsrc/tags-input.js Outdated
return false;
}

// Don't add if iti's invalid (eg, for pattern=)

Copy link
Copy Markdown

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"

@developit

Copy link
Copy Markdown
Owner

I think we're good, just didn't want to do it on a plane haha

@thomasdegry

Copy link
Copy Markdown
Author

Awesome! Understandable 😄
I fixed the typo that @zaygraveyard pointed out as well, thank you for that! 👍

@tumpio

Copy link
Copy Markdown

Can we make a release for this?

@tumpio

Copy link
Copy Markdown

hmm there seems to be quite big fork in https://github.com/pirxpilot/tags-input

@vsg24

Copy link
Copy Markdown

@developit WTH... just do it already

Sign up for freeto 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.

5 participants

@thomasdegry@developit@tumpio@vsg24@ziadkh0