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

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -

PostgreSQL 9.x - pg_read_binary_file & inserting files into bytea -