Use variable for email regex
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@54445 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
5ef63a02c9
commit
5a587eb22f
|
@ -18,7 +18,7 @@ export class Validator {
|
|||
}
|
||||
|
||||
public static emailValidator(email: any): boolean {
|
||||
if (email.match("^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$"))
|
||||
if (email.match(this.regex))
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue