I’ve tried to implement checkbox validation in a simple form, but something won’t work properly. The problem is, the checkbox changes the valid state once. If it was initially invalid while unchecked and changes state to valid after checked, it won’t switches back to invalid if unchecking.
@mhartington Right, I’ve pasted wrong code, basically I’ve used ion-checkbox, but with same result.
@xr0master With or without “ngForm” it was the same. Also false was my first try, but it didn’t helped or changed anything (except field initialization state)
How can I add the validation if i have a list of checkbox and at least 1 should be selected? how can i put the validation along with error if not selected with a msg “Please Select one”
For ionic5 I had to use formControlName instead of ngControl and $event.detail.checked instead of $event.checked, but with these changes works super !!!