Skip to content

Commit

Permalink
Merge pull request #1856 from bcgov/feature/emailFix
Browse files Browse the repository at this point in the history
Fix for email
  • Loading branch information
mightycox authored Apr 19, 2024
2 parents a6bf08a + aafc671 commit 5efd65a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/secure-message/InviteUserPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ export default {
emailRules() {
return [
v => !!v || this.emailHint,
v => /^[\w!#$%&’*+/=?`{|}~^-]+(?:\.[\w!#$%&’*+/=?`{|}~^-]+)*@(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,6}$/.test(v) || this.emailHint,
v => /^[\w!#$%&’*+/=?`{|}~^-]+(?:\.[\w!#$%&’*+/=?`{|}~^-]+)*@(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,63}$/.test(v) || this.emailHint,
];
}
},
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/utils/institute/formRules.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {LocalDate} from '@js-joda/core';
* @returns Function
*/
const email = (message = 'E-mail must be valid') => {
return v => !v || /^(?=[A-Za-z0-9][A-Za-z0-9@._%+-]{5,253}$)[A-Za-z0-9._%+-]{1,64}@(?:(?=[A-Za-z0-9-]{1,63}\.)[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*\.){1,8}[A-Za-z]{2,63}$/.test(v) || message;
return v => !v || /^[\w!#$%&’*+/=?`{|}~^-]+(?:\.[\w!#$%&’*+/=?`{|}~^-]+)*@(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,63}$/.test(v) || message;
};

/**
Expand Down

0 comments on commit 5efd65a

Please sign in to comment.