Merge pull request #2198 from nado/Fix-#2164

Fix #2164 : Resized max length of mail address up to 254 chars
This commit is contained in:
hiker 2015-06-02 13:47:54 +10:00
commit 8fd0b9186a
2 changed files with 3 additions and 3 deletions

View File

@ -1067,7 +1067,7 @@ msgid "Email"
msgstr ""
#: src/states_screens/register_screen.cpp:292
msgid "Email has to be between 4 and 50 characters long!"
msgid "Email has to be between 5 and 254 characters long!"
msgstr ""
#: src/states_screens/register_screen.cpp:298

View File

@ -287,9 +287,9 @@ void RegisterScreen::doRegister()
{
m_info_widget->setText(_("Password has to be between 8 and 30 characters long!"), false);
}
else if (email.size() < 4 || email.size() > 50)
else if (email.size() < 5 || email.size() > 254)
{
m_info_widget->setText(_("Email has to be between 4 and 50 characters long!"), false);
m_info_widget->setText(_("Email has to be between 5 and 254 characters long!"), false);
}
else if ( email.find(L"@")== -1 || email.find(L".")== -1 ||
(email.findLast(L'.') - email.findLast(L'@') <= 2 ) ||