Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RequiredIf not working in MVC 5?

I would like to know if there exists RequiredIf annotation in MVC 5 because I'm in trouble trying to use it because it seems that it doesn't exists in MVC 5. Is there any solution, or I'm missing some library? (I know it exists in MVC3).

Also is there any alternative for conditional validation in MVC 5?

Thanks in advance.

like image 207
Shmwel Avatar asked Oct 06 '14 13:10

Shmwel


1 Answers

Required if is not a built-in attribute. You need to download and import third party library:

MVC Foolproof Validation

like image 121
meda Avatar answered Nov 01 '22 13:11

meda