Skip to content

Commit

Permalink
fix: add more validations to email
Browse files Browse the repository at this point in the history
  • Loading branch information
alfsouza708 committed Jan 28, 2022
1 parent 3d998df commit 87d6910
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/validators/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ export default {
hasAtLeastOneNumber: (value) => /\d+/.test(value),
emailSolfacil: (condition) => (value) => {
return [
/[a-zA-Z0-9.]+@solfacil.com.br/.test(value),
/[a-zA-Z0-9.]+@example.com/.test(value),
/\w+([.-]?\w+)*@solfacil.com.br/.test(value),
/\w+([.-]?\w+)*@example.com/.test(value),
][Number(condition === 'development')];
},
emailHasBrDomain: (condition) => (value) => {
Expand Down

0 comments on commit 87d6910

Please sign in to comment.