Skip to content

Commit 604fe44

Browse files
committed
citing my sources
1 parent 29b4761 commit 604fe44

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/helpers/configValidator.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ajv.addMetaSchema(metaSchema);
99
ajv.addFormat('comma-separated-emails', {
1010
type: 'string',
1111
validate: (emails) => {
12+
// this is Ajv's regex for email format (https://github.com/ajv-validator/ajv-formats/blob/master/src/formats.ts#L106)
1213
const emailRegex = new RegExp(/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i);
1314
return emails.split(',').every((email) => emailRegex.test(email.trim()));
1415
},

0 commit comments

Comments
 (0)