summaryrefslogtreecommitdiff
path: root/elm/User
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2019-10-02 20:07:53 +0200
committerYorhel <git@yorhel.nl>2019-10-02 20:07:55 +0200
commit2e9f6f1844131529f553de37eba0bca421a75f8b (patch)
treefb8b6fa55b3faae55c590d68be91f87855d94e9f /elm/User
parent97b88b8a7f4623434430956504321a36e5ac24b7 (diff)
Improve client-side username validation and registration message
This uses negative lookahead in the username regex so that the DB identifiers can be matched with an HTML5 `pattern` attribute.
Diffstat (limited to 'elm/User')
-rw-r--r--elm/User/Register.elm3
1 files changed, 2 insertions, 1 deletions
diff --git a/elm/User/Register.elm b/elm/User/Register.elm
index f3a28d70..abbf5d63 100644
--- a/elm/User/Register.elm
+++ b/elm/User/Register.elm
@@ -85,7 +85,8 @@ view model =
[ formField "username::Username"
[ inputText "username" model.username Username GUE.valUsername
, br_ 1
- , text "Preferred username. Must be lowercase and can only consist of alphanumeric characters."
+ , text "Preferred username. Must be lowercase, between 2 and 15 characters long and consist entirely of alphanumeric characters or a dash."
+ , text " Names that look like database identifiers (i.e. a single letter followed by several numbers) are also disallowed."
]
, formField "email::E-Mail"
[ inputText "email" model.email EMail GUE.valEmail