mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-30 17:52:12 +00:00
Fix Regex to allow Umlaute "üÜ" in username (#1466)
## Description: Modified the regex pattern & full unicode support (/u) 1) Allow Umlaute "üÜ" in usernames on client-side 2) Allow Umlaute "üÜ" in usernames on server-side Before only the name "üÜüÜ" would have been possible as the pattern was |üÜ -> or "üÜ" as a combined sequence |[üÜ] -> or either one of these letters ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [ ] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced - [x] I have read and accepted the CLA aggreement (only required once). Not 100% sure what/where else to test. I started couple of private lobbies with various names. ## Please put your Discord username so you can be contacted if a bug or regression is found: [UN nvm]
This commit is contained in:
+1
-1
@@ -162,7 +162,7 @@ export const TeamSchema = z.string();
|
||||
const SafeString = z
|
||||
.string()
|
||||
.regex(
|
||||
/^([a-zA-Z0-9\s.,!?@#$%&*()\-_+=[\]{}|;:"'/\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff]|üÜ])*$/,
|
||||
/^([a-zA-Z0-9\s.,!?@#$%&*()\-_+=[\]{}|;:"'/\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff]|[üÜ])*$/u,
|
||||
)
|
||||
.max(1000);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user