Disable required validation by JavaScript

前端 未结 7 830
半阙折子戏
半阙折子戏 2020-12-19 02:11

I have a create form to create an object. The create model has some properties that are only visible (.hide, .show()) if a checkbox is checked and that are marked required (

相关标签:
7条回答
  • 2020-12-19 03:17

    The default DataAnnotationsModelValidatorProvider adds a Required attribute to all value types. You can change this behavior by adding the code in this answer.

    0 讨论(0)
提交回复
热议问题