Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions desk/src/components/EmailEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ function submitMail() {
return;
}

console.log(toEmailsClone.value.join(","));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this please

sendMail.submit();
}

Expand Down
3 changes: 2 additions & 1 deletion desk/src/components/MultiSelectInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@ function reload(val) {
const addValue = (value) => {
error.value = null;
if (value) {
const splitValues = value.split(",");
const regex = /,(?=(?:(?:[^"]*"){2})*[^"]*$)/; // Split base on commas not within quotes
const splitValues = value.split(regex);
splitValues.forEach((value) => {
value = value.trim();
if (value) {
Expand Down
5 changes: 4 additions & 1 deletion desk/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,11 @@ export function getAssign(s: string): string | undefined {
}

export function validateEmail(email) {
/* RFC-5322 3.4 Compliant Email Pattern
* https://regex101.com/library/6EL6YF
*/
const regExp =
/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
/((?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\]))/;
return regExp.test(email);
}

Expand Down
Loading