-
Notifications
You must be signed in to change notification settings - Fork 541
Tags with dots not working. #70
Comments
In addition to tags with dots not working, I am running into an issue where tags with dashes are not working. If I set the setting of converting spaces to dashes I can add the tag as long as it doesn't come from autocomplete. |
So looking at this closer if you set the allowed tags pattern to /^[a-zA-Z0-9\s-.]+$/ you can add a dot and a dash |
By default, only alphanumeric characters are allowed. That can be easily changed by setting the <tags-input ng-model="tags" allowed-tags-pattern="^[a-zA-Z0-9\.\-]$" /> This isn't the first time someone asks a question like this one. Even though all available options are documented, I wonder if |
Oh, I take the blame on that one for not reading the docs thoroughly. I did look at the options, but probably didn't relate the tag not being added with a configuration issue. At first I thought it was a bug, probably because there's nothing going on when you enter an invalid tag ( Ej. no error classes or else ). Maybe moving the Also, I think the autosuggestions shouldn't be displaying strings that do not pass the validation. This is an awesome directive by the way, good job! |
@mbenford I think the documentation is fine -- I think the problem stems from the default pattern not allowing some commonly used characters such as dots and dashes. Perhaps the default pattern should be more liberal and the onus should be on the user to restrict behavior? |
I agree with @FoxxMD the default should be a bit more loose and be something that you can tighten if you need to. I think I was thrown off as I was able to create tags with dashes by using a space and hitting enter and also select them in the typeahead but couldn't figure out why they weren't accepted so I thought something was broke so some minimal feedback of showing that the tag doesn't pass validation would be helpful. |
I agree with both suggestions: to make Would any of you guys mind creating those issues? I'll appreciate it. |
When a tag has a dot in it, the tag is not being added. If that's how it is by design, I think we should have a way to allow dots in tags. I'm building a stackoverflow-like tagging input, and programming terms tend to have dots in them.
Examples:
Node.js, Socket.IO, asp.net, vb.net, .htaccess, etc...
The text was updated successfully, but these errors were encountered: