Skip to content

Commit

Permalink
Chore: add email for debates-debats (#5151)
Browse files Browse the repository at this point in the history
* add email
  • Loading branch information
timarney authored Feb 24, 2025
1 parent dfee606 commit 9343b99
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/tests/validation/validation.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,7 @@ describe("Gov Email domain validator", () => {
["test@something", false],
["[email protected]", true],
["[email protected]", true],
["[email protected]", true],
["[email protected]", true],
["[email protected]", true],
["[email protected]", true],
Expand Down
2 changes: 1 addition & 1 deletion lib/validation/validation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ export const setFocusOnErrorMessage = (props: FormikProps<Responses>, errorId: s
*/
export const isValidGovEmail = (email: string): boolean => {
const regex =
/^([a-zA-Z0-9!#$%&'*+-/=?^_`{|}~.]+(\+[a-zA-Z0-9!#$%&'*+-/=?^_`{|}~.]*)?)@((?:[a-zA-Z0-9-.]+\.gc\.ca|cds-snc\.freshdesk\.com)|(canada|cds-snc|elections|rcafinnovation|canadacouncil|nfb)\.ca)$/;
/^([a-zA-Z0-9!#$%&'*+-/=?^_`{|}~.]+(\+[a-zA-Z0-9!#$%&'*+-/=?^_`{|}~.]*)?)@((?:[a-zA-Z0-9-.]+\.gc\.ca|cds-snc\.freshdesk\.com)|(canada|cds-snc|elections|rcafinnovation|canadacouncil|nfb|debates-debats)\.ca)$/;
return regex.test(email);
};

Expand Down

0 comments on commit 9343b99

Please sign in to comment.