Angular has great form validation built in, but it seems like the ionic-checkbox stops that from working. I have a simple form with a submit button that stays disabled until the required fields are filled out, including a confirmation checkbox.
However, using an ion-checkbox like this:
<ion-checkbox name="confirmed" color="primary" class="checkbox" [(ngModel)]="test" required></ion-checkbox>
Means it’s not validated. I’m going to assume because an ion-checkbox isn’t even a checkbox at all, so Angular’s form validation can’t check if it’s checked…because…it’s not a checkbox. Changing my code to:
<input type="checkbox" name="confirmed" color="primary" class="checkbox" [(ngModel)]="test" required/>
let’s validation keep on working just fine. I’m trying to understand why the ion-checkbox wouldn’t put like a hidden checkbox on screen so validation could work. Any idea? I haven’t seen any open bugs on this, has anyone else experienced this?