|
@ -132,8 +132,9 @@ class RegisterInteractor { |
|
|
if !Utility.isValidEmail(email: userName) {error = error + "email must be valid"} |
|
|
if !Utility.isValidEmail(email: userName) {error = error + "email must be valid"} |
|
|
isValid = false |
|
|
isValid = false |
|
|
}else { |
|
|
}else { |
|
|
if ( Int(userName) == nil) { |
|
|
|
|
|
error = error + "userName must be either mobile number or email." |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ( userName.rangeOfCharacter(from: NSCharacterSet.decimalDigits.inverted) == nil) { |
|
|
|
|
|
error = error + "username must be either mobile number or email." |
|
|
isValid = false |
|
|
isValid = false |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|