c# - ASP.NET MVC 2 client-side validation triggering incorrectly -
i using dataannotations enable client-side validation in asp.net mvc 2 project. having issue url validation regex passes unit test, fails in actual website. model [regularexpression(urlvalidation.regex, errormessage = urlvalidation.message)] public string url { get; set; } regex = "(([\w]+:)?//)?(([\d\w]|%[a-fa-f\d]{2,2})+(:([\d\w]|%[a-fa-f\d]{2,2})+)?@)?([\d\w][-\d\w]{0,253}[\d\w]\.)+[\w]{2,4}(:[\d]+)?(/([-+_~.\d\w]|%[a-fa-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fa-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fa-f\d]{2,2})*)?" message = "invalid url" view <div class="editor-label"> <%: html.labelfor(model => model.url) %> </div> <div class="editor-field"> <%: html.textboxfor(model => model.url) %> <%: html.validationmessagefor(model => model.url) %> </div> result url = http://www.chicagoshakes.com/main.taf?p=7,8 passing unit test [test] public void getvarurlpasses() { ...