Updating the comment's email and url validation regex

--HG--
branch : dev
This commit is contained in:
Nathan Heskew
2010-12-10 18:13:25 -08:00
parent 0bd37630d4
commit 008245d3d9

View File

@@ -7,12 +7,12 @@ namespace Orchard.Comments.ViewModels {
[StringLength(255)] [StringLength(255)]
public string Name { get; set; } public string Name { get; set; }
[Annotations.RegularExpression(@"^[\w-]+@([\w-]+\.)+[\w]{2,4}$")] [Annotations.RegularExpression(@"^[^@\s]+@[^@\s]+$")]
[StringLength(255)] [StringLength(255)]
public string Email { get; set; } public string Email { get; set; }
[StringLength(245)] [StringLength(245)]
[Annotations.RegularExpression(@"^(http(s)?://)?([\w-]+\.)+[\S]+$")] [Annotations.RegularExpression(@"^(http(s)?://)?([a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}[\S]+$")]
public string SiteName { get; set; } public string SiteName { get; set; }
[CommentRequired] [CommentRequired]