Wednesday, 28 August 2013

Why is this Regex not working on MVC unobtrusive validator?

Why is this Regex not working on MVC unobtrusive validator?

I have the folowing regex on my MVC view model (p.s. all other regex`es
work fine)
[Required, MaxLength(256)]
[RegularExpression(@"/(\[Brand name\])/i", ErrorMessage = "Reply message
<strong> Must</strong> contain <strong>[Brand name]</strong>")]
public string ReplyMessage { get; set; }

No comments:

Post a Comment