asp.net - MVC 2 date validation only required if checkbox is checked -
i using ef4 , asp.net mvc 2 web application. using data annotations validation.
is following possible? if so, how implement it? have checkbox, , , date. , date not required fields, when checkbox ticked , dates required fields. required error must display.
how possible?
thanks.
you need create validation attribute model class validates 3 fields.
for example, @ [fieldsmustmatch]
attribute in default mvc project template.
Comments
Post a Comment