FAQ Database Discussion Community


Foolproof multiple validators on the same fields

asp.net,asp.net-mvc,asp.net-mvc-4,foolproof-validation
I currently use foolproof for that validation: [RequiredIfNot("type", 3, ErrorMessage = "Please enter at least one value")] public int[] audites { get; set; } but customer wants to add validation as that: [RequiredIfNot("type", 3, ErrorMessage = "Please enter at least one value")] [RequiredIfNot("nature", 1, ErrorMessage = "Please enter at least...

How to fix the model to correctly use the MVC Foolproof library?

asp.net-mvc-5,foolproof-validation
I am trying to use MVC Foolproof library to validate my model and show error message respectively. However I am not applying the Data Annotation correctly so the validation does not works. My requirement is that I have two checkboxes and atleast one of them needs to be checked before...