Closed Apreche closed 13 years ago
\X doesn't work because it can represent multiple Unicode code points instead of just one. You need to use syntax such as \p{L} for letters, and \p{M} for marks such as accents.
Personally, after some consideration, I suggest something along the lines of this:
$Configuration['Garden']['User']['ValidationRegex'] = '^\/\<">#@\'\p{Zl}\p{Zp}\p{C}';
which should allow all characters except the backslash, forward slash, less than sign, greater than sign, single quote, double quote, hash, at sign, all line breaks, all paragraph breaks, and all control/other characters.
As @lackofcheese points out, you can override the regex with your own in the config.
I tried to make a username with unicode characters in it, and it didn't work. I even tried changing the validation regex to include \X, but that still didn't work. A user should be able to put ǜ in their username if they so desire.