mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-29 07:42:40 +00:00
BugFix Entering invalid email address into registration
gives error saying it's not supported #201
This commit is contained in:
parent
018f72e58c
commit
8dd7751cec
2 changed files with 10 additions and 0 deletions
|
@ -48,6 +48,7 @@
|
|||
"auth_invalid_login_param" = "Incorrect username and/or password";
|
||||
"auth_invalid_user_name" = "User names may only contain letters, numbers, dots, hyphens and underscores";
|
||||
"auth_invalid_password" = "Password too short (min 6)";
|
||||
"auth_invalid_email" = "This doesn't look like a valid email address";
|
||||
"auth_missing_password" = "Missing password";
|
||||
"auth_missing_optional_email" = "If you don't specify an email address, you won't be able to reset your password. Are you sure?";
|
||||
"auth_missing_email" = "Missing email address";
|
||||
|
|
|
@ -191,6 +191,15 @@
|
|||
NSLog(@"[AuthInputsView] Invalid user name");
|
||||
errorMsg = NSLocalizedStringFromTable(@"auth_invalid_user_name", @"Vector", nil);
|
||||
}
|
||||
else if (self.emailTextField.text.length)
|
||||
{
|
||||
// Check validity of the non empty email
|
||||
if ([MXTools isEmailAddress:self.emailTextField.text] == NO)
|
||||
{
|
||||
NSLog(@"[AuthInputsView] Invalid email");
|
||||
errorMsg = NSLocalizedStringFromTable(@"auth_invalid_email", @"Vector", nil);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue