Class-level validation

后端 未结 2 1168
独厮守ぢ
独厮守ぢ 2020-12-21 06:51

I am validating a class with DataAnnotations utils.

I have a class that has a Title property and an Item property. I want to apply a Requir

2条回答
  •  星月不相逢
    2020-12-21 07:31

    well, on property level contingent validations are hard to achieve in MVC. but u can extend the framework or u can use some other library to achieve the goal. i m using foolproof validation by nick successfully for contingent validations in my project. u can take a look at it here

提交回复
热议问题