Add: Email validator
This commit is contained in:
@@ -6,6 +6,8 @@ function AccountValidator() {
|
||||
this.patternPlayerPW = /^[0-9]{2,8}$/;
|
||||
|
||||
this.patternLicenseTimerPW = /^[0-9]{2,8}$/;
|
||||
|
||||
this.patternEmailAddress = /([a-zA-Z0-9]+)([+\_\.\-{1}])?([a-zA-Z0-9]+)\@([a-zA-Z0-9]+)([\.])([a-zA-Z\.]+)/;
|
||||
}
|
||||
|
||||
|
||||
@@ -104,6 +106,19 @@ AccountValidator.prototype.messageForInvalidLicenseTimerPassword = function(text
|
||||
}
|
||||
|
||||
|
||||
// email ID
|
||||
AccountValidator.prototype.isValidEmailAddress = function(email) {
|
||||
if(!this.patternEmailAddress.test(email))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
AccountValidator.prototype.messageForInvalidEmailAddress = function(email) {
|
||||
return "유효하지 않은 이메일 주소입니다. 올바른 이메일 주소를 입력해주세요.";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
AccountValidator.MAESTRO_ID_LENGTH_MINIMUM = 4;
|
||||
|
||||
Reference in New Issue
Block a user