Angularjs Validation And Field Name With Square Brackets
I'm following this tutorial http://scotch.io/tutorials/javascript/angularjs-form-validation but I have form fields with square brackets ( for example company_bundle_task[timeStart]
Solution 1:
You have to escape your name in quotes, since a.example is equivalent of a['example'] you can write:
<span class="help-block" ng-show="company_bundle_task['company_bundle_task[timeStart][date]'].$error.required">Required</span>
Post a Comment for "Angularjs Validation And Field Name With Square Brackets"