I would like some help with this issue.
I am currently making validation for my application. The application is a quiz and I would like to have every question to be required (not empty). With dropdowns and text I can simply check the form if this is the case, however with checkboxes, there is something faulty. It requires all checboxes to be checked once before it is deemed valid.
My code:
<form name="testForm" novalidate ng-submit="vm.success(testForm)">
<div ng-repeat="question in vm.currentQuestions">
<div class="item-accordion" ng-repeat="choice in question.Answers">
<ion-item class="item item-checkbox">
<label class="checkbox">
<input type="checkbox" ng-model="placeholder" name="{{question.QuestionId}}" ng-change="vm.checkboxAnswer(choice)" ng-required="true">
</label>
{{choice.Text}}
</ion-item>
</div>
</div>
</form>
When I console log the form controller, I can see the validation checks for this input, however nothing ($valid, $error, $dirty) changes. I don't understand why nothing changes. Only when I have checked all boxes once, will $valid turn true, but I need $valid to be turned to true if only 1 checkbox has been checked.