#17276: Fixing email validation

--HG--
branch : dev
This commit is contained in:
Sebastien Ros
2011-02-07 17:26:00 -08:00
parent b53f2e6a36
commit 396632dbce
8 changed files with 181 additions and 30 deletions

View File

@@ -3,6 +3,8 @@ using Orchard.Security;
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]$";
public string UserName {
get { return Record.UserName; }
set { Record.UserName = value; }