mirror of
https://github.com/akveo/ngx-admin.git
synced 2026-01-28 12:16:10 +01:00
fix(validator): change email regex to: http://emailregex.com/
This commit is contained in:
parent
d117e8471c
commit
4470607ab2
1 changed files with 1 additions and 1 deletions
|
|
@ -3,7 +3,7 @@ import {AbstractControl} from '@angular/forms';
|
|||
export class EmailValidator {
|
||||
|
||||
public static validate(c:AbstractControl) {
|
||||
let EMAIL_REGEXP = /^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i;
|
||||
let EMAIL_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,}))$/;
|
||||
|
||||
return EMAIL_REGEXP.test(c.value) ? null : {
|
||||
validateEmail: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue