Skip to content

Commit

Permalink
Merge pull request #194 from solfacil/feat/add-new-validator
Browse files Browse the repository at this point in the history
feature: alterar regex de email
  • Loading branch information
Ariel-MAJ committed Apr 22, 2024
2 parents a230b66 + 89f46f8 commit 0f875df
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/validators/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ export default {
/\w+([.-]?\w+)*@example.com/.test(value),
][Number(condition === 'development')];
},
emailSolfacilComSubdominio: (condition) => (value) => {
return [
/\w+([.-]?\w+)*@(\w+([.-]\w)*\.)*solfacil\.com\.br/.test(value),
/\w+([.-]?\w+)*@example\.com/.test(value),
][Number(condition === 'development')];
},
emailHasBrDomain: (condition) => (value) => {
return [/.br$/.test(value), true][Number(condition === 'development')];
},
Expand Down

0 comments on commit 0f875df

Please sign in to comment.