Skip to content

Commit

Permalink
code was fixed in changePassSchema.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Sunagatov committed Aug 29, 2024
1 parent b0c895b commit b88b76d
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 b88b76d

Please sign in to comment.