client-side validation in custom validation attribute - asp.net mvc 4

后端 未结 2 1561
陌清茗
陌清茗 2020-11-28 06:00

I have followed some articles and tutorials over the internet in order to create a custom validation attribute that also supports client-side validation in an asp.net mvc 4

2条回答
  •  野性不改
    2020-11-28 06:47

    It's worth noting that the [RequiredIf] attribute needs to be added to the second form field in the view model in order for client validation to work.

提交回复
热议问题