Skip to content

Commit

Permalink
match front-end profile validation to backend
Browse files Browse the repository at this point in the history
Removed .min(5) from backend validation due to redundancy with .email() check
  • Loading branch information
bglidwell committed Aug 31, 2020
1 parent b026f41 commit e4044e4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const schema = {
email: yup
.string()
.email(translatedErrors.email)
.lowercase()
.required(translatedErrors.required),
username: yup.string().nullable(),
password: yup
Expand Down
3 changes: 1 addition & 2 deletions packages/strapi-admin/validation/common-validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ const {
const email = yup
.string()
.email()
.lowercase()
.min(5);
.lowercase();

const firstname = yup.string().min(1);

Expand Down

0 comments on commit e4044e4

Please sign in to comment.