Skip to content

Commit

Permalink
feat: (server)registration api server side validation (foyzulkarim#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
aninda052 committed Sep 12, 2023
1 parent 3222430 commit b51451b
Show file tree
Hide file tree
Showing 5 changed files with 5,397 additions and 21 deletions.
7 changes: 3 additions & 4 deletions client/src/sections/auth/RegistrationForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,9 @@ const validationSchema = yup.object({
email: yup.string().email().required('Email is required'),
password: yup.string()
.required('Password is required')
.min(4, 'Your password is too short.')
.matches(/[a-zA-Z0-9]/, 'Password can only contain Alphanumeric letters.'),
confirmPassword: yup
.string()
.min(4, 'Password length must be at least 4 characters long'),
// .matches(/[a-zA-Z0-9]/, 'Password can only contain Alphanumeric letters.'),
confirmPassword: yup.string()
.oneOf([yup.ref('password')], 'Passwords must match'),
});

Expand Down
Loading

0 comments on commit b51451b

Please sign in to comment.