Skip to content

Commit

Permalink
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion api/src/db/models/definitions/users.ts
Expand Up @@ -107,7 +107,10 @@ export const userSchema = schemaHooksWrapper(
type: String,
unique: true,
match: [
/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,10})+$/,
/**
* RFC 5322 compliant regex. Taken from http://emailregex.com/
*/
/^(([^<>()\[\]\\.,;:\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,}))$/,
'Please fill a valid email address'
],
label: 'Email'
Expand Down

0 comments on commit 91a90ca

Please sign in to comment.