mardi 15 décembre 2015

Using MVC Validation Extensions with Checkboxes

I'm using the Brostein MVC Validation Extension package.

They recently updated the package (v1.1.3) so that conditional data annotations take into account checkboxes but there has been no update to their documentation so I have no idea what the actual syntax should be. For example, in the past I have used [RequiredIfValue("OtherProperty","15")] where the property being decorated is only required if the other property has a value of "15".

My best guess for checkboxes would be [RequiredIfValue("OtherProperty","True")] but this does NOT work.

Does anyone have experience with this package and specifically with conditional data annotations connected to checkboxes?

Aucun commentaire:

Enregistrer un commentaire