fix(SignUp): updated username regex check message

This commit is contained in:
Nishchit14
2023-07-28 16:08:06 +05:30
parent 997e9738fa
commit 2642d49c57
2 changed files with 11 additions and 4 deletions

View File

@@ -101,7 +101,10 @@ const SignUp: FC<IModal> = ({ opened, onClose }) => {
required: true, required: true,
maxLength: 50, maxLength: 50,
minLength: 1, minLength: 1,
pattern: /^[0-9a-zA-Z ]+$/, pattern: {
value: /^[0-9a-zA-Z ]+$/,
message: "Username cannot contain special characters"
},
}} }}
useformRef={form} useformRef={form}
onKeyDown={_onKeyDown} onKeyDown={_onKeyDown}
@@ -110,7 +113,7 @@ const SignUp: FC<IModal> = ({ opened, onClose }) => {
? errors?.username?.message || 'Please enter username' ? errors?.username?.message || 'Please enter username'
: '' : ''
} }
wrapperClassName="!mb-2" wrapperClassName="!mb-4"
/> />
<Input <Input
placeholder="Enter your email" placeholder="Enter your email"
@@ -132,7 +135,7 @@ const SignUp: FC<IModal> = ({ opened, onClose }) => {
'Please enter valid username or password' 'Please enter valid username or password'
: '' : ''
} }
wrapperClassName="!mb-2" wrapperClassName="!mb-4"
/> />
<Input <Input
placeholder="Enter password" placeholder="Enter password"
@@ -163,7 +166,7 @@ const SignUp: FC<IModal> = ({ opened, onClose }) => {
? errors?.password?.message || 'Please enter valid password' ? errors?.password?.message || 'Please enter valid password'
: '' : ''
} }
wrapperClassName="!mb-3" wrapperClassName="!mb-4"
/> />
<Button <Button

View File

@@ -547,6 +547,10 @@
.\!mb-3{ .\!mb-3{
margin-bottom: 0.75rem !important; margin-bottom: 0.75rem !important;
}
.\!mb-4{
margin-bottom: 1rem !important;
} }
.\!ml-auto{ .\!ml-auto{
margin-left: auto !important; margin-left: auto !important;