Validation of invisible and disabled fields in AngularJS

后端 未结 3 814
陌清茗
陌清茗 2020-12-29 09:11

Is there any way to do conditional validation in AngularJS? The problem I am trying to solve is basically a list of radio buttons that enable/disable inputs based on the sel

3条回答
  •  隐瞒了意图╮
    2020-12-29 09:42

    I think that you are using ng-required incorrectly. You have hardcoded it to true for both text inputs but actually ng-required on those inputs should only be set true if the radio button is ticked.

提交回复
热议问题