Accept emails with format e.email (from #4718)

This commit is contained in:
Lois Doyenard 2022-01-25 10:48:38 +01:00
parent b66e0d0d0d
commit 3d4cb58af5

View File

@ -386,7 +386,7 @@ void RegisterScreen::doRegister()
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 ) ||
(email.findLast(L'.') - email.findLast(L'@') <= 1 ) ||
email.findLast(L'@')==0 || email[(email.size())-1]=='.')
{
m_info_widget->setText(_("Email is invalid!"), false);