XF 2.2 User regex always saying invalid

Satal

Member
I'm currently trying to restrict the characters that user's can out in their usernames.

I'm trying to restrict to just
Code:
^[a-zA-Z0-9_\-]$
which doesn't appear to work but even when I try
Code:
^[a-zA-Z0-9]$
(suggested here) I get the same error message.

1689140122581.webp

I have tried making this change from both my desktop and phone, admittedly Chrome on both. Logged out of the admin portal and logged back in. I've also used an online regex tester and it appears to work fine.

Am I missing something obvious?
 
Yup, that's the difference; as it says on the configuration, "use a full expression, including delimiters and switches" - which are the / at the start and end of the expression, and the i is a switch for case-insensitive.
 
Top Bottom