From 99f36ed25832b0a7d8fb46088b285c6aca1b53db Mon Sep 17 00:00:00 2001 From: Piotr Rogowski Date: Tue, 18 Oct 2022 13:54:27 +0200 Subject: [PATCH] Fix username regex --- src/utils/form.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/form.ts b/src/utils/form.ts index ef8c531..cc13c95 100644 --- a/src/utils/form.ts +++ b/src/utils/form.ts @@ -4,7 +4,7 @@ const REQUIRED_MESSAGE = 'This field is required'; const passwordPattern = /^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&*])(?=.{8,})/; -const usernamePattern = /^[A-z][A-z0-9_\\-]{3,30}$/; +const usernamePattern = /^[A-Za-z0-9][\w\\-]{3,30}$/; export const passwordRules: Rule[] = [ { required: true },