mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
#19393: Improving email validation
Work Item: 19393 --HG-- branch : 1.x extra : rebase_source : 314d4929ac0e3ac30953ccb5ee5ed0a3069751f0
This commit is contained in:
@@ -204,7 +204,8 @@ namespace Orchard.Tests.Modules.Users.Controllers {
|
||||
@"""Austin@Powers""@example.com",
|
||||
@"Ima.Fool@example.com",
|
||||
@"""Ima.Fool""@example.com",
|
||||
@"""Ima Fool""@example.com"
|
||||
@"""Ima Fool""@example.com",
|
||||
"2xxx1414@i.ua"
|
||||
)]
|
||||
string email)
|
||||
{
|
||||
|
@@ -5,7 +5,7 @@ namespace Orchard.Users.Models {
|
||||
public sealed class UserPart : ContentPart<UserPartRecord>, IUser {
|
||||
public const string EmailPattern =
|
||||
@"^(?![\.@])(""([^""\r\\]|\\[""\r\\])*""|([-a-z0-9!#$%&'*+/=?^_`{|}~]|(?<!\.)\.)*)(?<!\.)"
|
||||
+ @"@[a-z0-9][\w\.-]*[a-z0-9]\.[a-z][a-z\.]*[a-z]$";
|
||||
+ @"@([a-z0-9][\w-]*\.)+[a-z]{2,}$";
|
||||
|
||||
public string UserName {
|
||||
get { return Record.UserName; }
|
||||
|
Reference in New Issue
Block a user