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:
sofia.baltzi 2018-12-18 12:33:18 +00:00
parent 5ef63a02c9
commit 5a587eb22f
1 changed files with 1 additions and 1 deletions

View File

@ -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;