Mid*_*est 1 validation html5 input angularjs
我有动态分配名称的输入.结果我有输入名称,如
NAME = "运动员/ Guardian_firstName"
对于输入它很好,但验证不起作用,因为这个记录
medForm.Athlete/Guardian_firstName.$无效
由于斜杠"/",对于angular的ng-class无效.(medForm是表单的名称).有没有其他方法可以从角度访问表单中的输入,因此具有任何特殊字符的输入将起作用?
<div class="form-group" ng-class="{ 'has-error': medForm.Athlete/Guardian_firstName.$invalid }">
<label for="firstName" class="col-md-3 control-label">First Name</label>
<div class="col-md-9">
<input type="text" class="form-control" id="firstName" name="Athlete/Guardian_firstName" required ng-model="firstName">
</div>
</div>
Run Code Online (Sandbox Code Playgroud)