Making a checkboxes to play with unobtrusive jQuery validation in MVC

added by bankier
12/6/2010 4:02:03 PM

0 Kicks, 141 Views

Is it a pretty common scenario to have a checkbox on a form, that is required to be checked during POST-ing of a form. This usually happens when we have a typical ‘Agree to Terms and Conditions’ element. When I started to play with unobtrusive JavaScript validation in new ASP.NET MVC i was pretty sure that decorating boolean property with [Required] attribute will solve that issue. Surprisingly it doesn’t.