I have a form with some fields (build with ng-repeat, so I dont know how much). I added to the submit button
ng-disabled=form.field.$invalid
and added to all the fields "required" but the ng-disabled work just for this last field. my code:
<form name="form" novalidate>
<div ng-repeat="q in questions">
<textarea name="answer" type="text" ng-model="answers[$index]" required></textarea>
</div>
<button ng-disabled="form.answer.$invalid || form.answer.$pristine" type="submit" ng-click="submit(q)">'Submit'</button>
</form>
how can I validate the user change all fields? thanks!