为angularJS制作标志?

时间:2015-04-16 19:26:11

标签: html angularjs kendo-ui

加载此表单时,我会重置单选按钮'价值为null因此,如果用户没有选择该值,我可以告诉您。

如何将单选按钮设为必填字段?

HTML:

<div class="form-group col-md-6" ng-show="showrRiskAccpt">
    <div>
        <label class="control-label" for="riskAcceptance">Risk Acceptance</label>
    </div>

    <div>
        <input type="radio" id="riskAcceptanceDec" value="Y" 
            ng-model="processRating.riskAcceptanceFlag" 
            ng-change="showRationalCmmt()" 
            ng-required="showrRiskAccpt = true" 
            data-required-msg="Risk Acceptance is required">Yes
        <input type="radio" id="riskAcceptanceDec" value="N"
            ng-model="processRating.riskAcceptanceFlag"  
            ng-change="showRationalCmmt()"
            ng-required="showrRiskAccpt">No
    </div>
</div>

0 个答案:

没有答案