上記の問題では、ユーザーが残高、最低額、その他の金額を支払うことができる 3 つのラジオ ボタンがあり
ます
。そして、次のフィールドセットでいくつかの検証が行われました。フォームが有効になるまで送信ボタンを無効にしたい。しかし、ラジオボタンで残高または最低額の支払いオプションを選択しても、送信ボタンは無効のままです(フォームが有効になるのを待っています。おそらく、3番目のオプションにある検証を探しています)。どうすればこれを回避できますか?
HTML
<fieldset class="form-group clearfix">
<legend class="">Fieldset Title</legend>
<ul class="vList">
<li>
<input type="radio" class="" name="balancePayment" id="payBalance" ng-model="pay"
value="balanceAmount" />
<label class="" for="payBalance"> Balance:$130 </label>
</li>
<li>
<input type="radio" class="form__radio" name="balancePayment" id="payMinimum" ng-model="pay"
value="minimumAmount"/>
<label class="" for="payMinimum"> Minimum Amount:$4 </label>
</li>
<li>
<input type="radio" class="" name="balancePayment" id="payOther" ng-model="pay"
value="otherAmount"/>
<label class="form__radioLabel" for="payOther"> Pay Different Amount </label>
</li>
</ul>
<div class="otherpayment" ng-show ="pay=='otherAmount'" ng-class="{
'has-error': myform.otherAmountpay.$invalid && myform.otherAmountpay.$dirty,
'has-success':myform.otherAmountpay.$valid}">
<span class="help-block" ng-show="myform.otherAmountpay.$error.required &&
myform.otherAmountpay.$dirty">Please enter your payment</span>
<input id="Tel1" name="otherAmountpay" ng-model="otherAmountpay"
class="form-control" type="number" required=""/>
</div>
</fieldset>