Skip to content

Commit

Permalink
Merge pull request #1215 from cmgustavo/bug/create-account-password-v…
Browse files Browse the repository at this point in the history
…alidation-01

Fix: adds password validation to creating account
  • Loading branch information
JohnathanWhite authored Jul 1, 2024
2 parents d46ac2d + c11f703 commit b66c414
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/navigation/auth/screens/CreateAccount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,13 @@ const CreateAccountScreen: React.VFC<CreateAccountScreenProps> = ({
givenName: yup.string().required().trim(),
familyName: yup.string().required().trim(),
email: yup.string().email().required().trim(),
password: yup.string().required(),
password: yup
.string()
.required()
.matches(
/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&*])(?=.{8,})/,
'Must Contain 8 Characters, One Uppercase, One Lowercase, One Number and One Special Case Character',
),
agreedToTOSandPP: yup.boolean().oneOf([true], t('Required')),
agreedToMarketingCommunications: yup.boolean(),
});
Expand Down

0 comments on commit b66c414

Please sign in to comment.