From b8fe2833b63b15fa5803323b194a583f4c7b99b7 Mon Sep 17 00:00:00 2001 From: Mo Tarbin Date: Thu, 30 Jul 2026 01:53:44 -0400 Subject: [PATCH] allow numbers in username --- src/views/Authorization/Signup.jsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/views/Authorization/Signup.jsx b/src/views/Authorization/Signup.jsx index ccd3e0c..f08a7f6 100644 --- a/src/views/Authorization/Signup.jsx +++ b/src/views/Authorization/Signup.jsx @@ -87,10 +87,10 @@ const SignupView = () => { isValid = false } - // username should only contain lowercase letters, dot and dash: - if (!/^[a-z.-]+$/.test(username)) { + // username should only contain lowercase letters, numbers, dot and dash: + if (!/^[a-z0-9.-]+$/.test(username)) { setUsernameError( - 'Username can only contain lowercase letters, dot and dash', + 'Username can only contain lowercase letters, numbers, dot and dash', ) isValid = false } @@ -157,7 +157,7 @@ const SignupView = () => { id='username' name='username' autoComplete='username' - placeholder='lowercase letters, dot and dash' + placeholder='lowercase letters, numbers, dot and dash' value={username} error={usernameError} onChange={e => {