Skip to content

Commit

Permalink
fix: Resolves issue with adding long tld emails
Browse files Browse the repository at this point in the history
closes #127
  • Loading branch information
towfiqi committed Nov 9, 2023
1 parent 291aa60 commit 9b9b74a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/domains/DomainSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const DomainSettings = ({ domain, closeModal }: DomainSettingsProps) => {
let error: DomainSettingsError | null = null;
if (domainSettings.notification_emails) {
const notification_emails = domainSettings.notification_emails.split(',');
const invalidEmails = notification_emails.find((x) => /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(x) === false);
const invalidEmails = notification_emails.find((x) => /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,15})+$/.test(x) === false);
console.log('invalidEmails: ', invalidEmails);
if (invalidEmails) {
error = { type: 'email', msg: 'Invalid Email' };
Expand Down

0 comments on commit 9b9b74a

Please sign in to comment.