mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-18 17:47:54 +08:00
#18351: Improving comments validation message
Work Item: 18351 --HG-- branch : 1.x
This commit is contained in:
@@ -7,13 +7,13 @@ namespace Orchard.Comments.ViewModels {
|
||||
[StringLength(255)]
|
||||
public string Name { get; set; }
|
||||
|
||||
[RegularExpression(@"^[^@\s]+@[^@\s]+$")]
|
||||
[RegularExpression(@"^[^@\s]+@[^@\s]+$", ErrorMessage = "Invalid Email")]
|
||||
[StringLength(255)]
|
||||
public string Email { get; set; }
|
||||
|
||||
[StringLength(245)]
|
||||
[DisplayName("Site")]
|
||||
[RegularExpression(@"^(http(s)?://)?([a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}[\S]+$")]
|
||||
[RegularExpression(@"^(http(s)?://)?([a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}[\S]+$", ErrorMessage = "Invalid url")]
|
||||
public string SiteName { get; set; }
|
||||
|
||||
[Required, DisplayName("Comment")]
|
||||
|
Reference in New Issue
Block a user