mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-20 19:03:25 +08:00
Merge branch '1.7.x' into 1.x
Conflicts: src/Orchard.Web/Modules/Orchard.Workflows/Orchard.Workflows.csproj
This commit is contained in:
@@ -357,11 +357,21 @@ namespace Orchard.Users.Controllers {
|
||||
ModelState.AddModelError("username", T("You must specify a username."));
|
||||
validate = false;
|
||||
}
|
||||
else {
|
||||
if (userName.Length >= 255) {
|
||||
ModelState.AddModelError("username", T("The username you provided is too long."));
|
||||
validate = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (String.IsNullOrEmpty(email)) {
|
||||
ModelState.AddModelError("email", T("You must specify an email address."));
|
||||
validate = false;
|
||||
}
|
||||
else if (email.Length >= 255) {
|
||||
ModelState.AddModelError("email", T("The email address you provided is too long."));
|
||||
validate = false;
|
||||
}
|
||||
else if (!Regex.IsMatch(email, UserPart.EmailPattern, RegexOptions.IgnoreCase)) {
|
||||
// http://haacked.com/archive/2007/08/21/i-knew-how-to-validate-an-email-address-until-i.aspx
|
||||
ModelState.AddModelError("email", T("You must specify a valid email address."));
|
||||
|
Reference in New Issue
Block a user