Fix wrong username regex

This commit is contained in:
Jean-Benoît Grimaldi
2026-02-07 11:44:22 +01:00
parent 35b2081f28
commit c00b2d35c2
2 changed files with 2 additions and 2 deletions

View File

@@ -10,7 +10,7 @@
// Ideally later on we could find a way to hydrate full React components instead
// of doing this, as this can very quickly get out of hands.
const VALID_USERNAME_RE = /^\s*([a-z0-9.=_/-]+|@[a-z0-9.=_/-]+(:.*)?)\s*$/g;
const VALID_USERNAME_RE = /^\s*([a-z0-9.=_/+-]+|@[a-z0-9.=_/+-]+(:.*)?)\s*$/g;
/** Grab the nearest error message inserted by the templates by error kind and code */
function grabErrorMessage(

View File

@@ -49,7 +49,7 @@ violation contains {
"field": "username", "code": "username-invalid-chars",
"msg": "username contains invalid characters",
} if {
not regex.match(`^[a-z0-9.=_/-]+$`, input.username)
not regex.match(`^[a-z0-9.=_/+-]+$`, input.username)
}
violation contains {