Skip to content

Commit

Permalink
Merge pull request #273 from Sunagatov/bugfix/reset-password-fix
Browse files Browse the repository at this point in the history
code was fixed in changePassSchema.ts
  • Loading branch information
Sunagatov authored Aug 29, 2024
2 parents b0c895b + b88b76d commit bb9f2ad
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/validation/changePassSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ export const changePassSchema = yup.object().shape({
code: yup
.string()
.required('Code is a required field')
.matches(/^\d{3}-\d{3}-\d{3}$/, 'Invalid format. Use ###-###-###'),
.matches(
/^\d{9}$/,
'Invalid format. Please use this format #########. Enter exactly 9 digits without any separators.'
),
password: yup
.string()
.required('Password is a required field')
Expand Down

0 comments on commit bb9f2ad

Please sign in to comment.