I’m using the Login extra and the snippet [[!Register]] to register an user.
I don’t want crazy user names that can broke something in there so I’m trying to validate the username to only accept: lowercase, uppercase, numbers that is it. [a-zA-Z0-9]+$
No extra characters of any kind and no spaces :strip=^ ^
But [a-zA-Z0-9]+$ still accepting characters between letters.
So if this is a regex pattern, the $ symbol is anchoring the pattern to the end of the string, so I’d imagine that your pattern would accept anything that ends in one or more alphanumeric characters. Without knowing too much of the specific nuances of what you’re doing (I’m replying from a phone right now), I would suggest trying something like ^[a-zA-Z0-9]+$ where the ^ symbol matches the beginning of a string. That might help some maybe…
The extra ^ makes it look at the entire string. Without it the expression is just matching on the last character meaning john!doe would pass but johndoe! would not.
And if it is a bug with Login/Register then create a custom validator instead of trying to inline the regex. A custom snippet that’s as basic as this:
My guess is that Login would choke on using the ^ character as part of the pattern since it’s using them like quotes around the property value. Nick’s suggestion of a custom validator may be your best bet.