ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

bug: Unchecking a required <ion-checkbox> does not make the form $invalid

Open imgx64 opened this issue 11 years ago • 5 comments

Type: bug

Platform: all

Issue #2786 was closed by Ionitron as inactive, but it's still present so I'm reopening it. The plunkr link below uses nightly builds.

== Original bug ==

Plunkr: http://plnkr.co/edit/NZAg38SAjgSQzbRTl9WY?p=preview

I'm using Angular form validation. An unchecked <ion-checkbox> with required attribute correctly makes the form $invalid. However, if I check it then uncheck it, the form does not become $invalid again.

This problem does not happen with a plain <input type="checkbox">, as demonstrated in the plunkr.

imgx64 avatar Apr 24 '15 04:04 imgx64

This doesn't seem to be fixed, the plunkr still exhibits the same behavior with the latest nightly: http://plnkr.co/edit/NZAg38SAjgSQzbRTl9WY?p=preview

imgx64 avatar May 05 '15 05:05 imgx64

+1

badpenguin avatar Mar 01 '16 17:03 badpenguin

+1

jlstr avatar Apr 06 '16 16:04 jlstr

had the same issue, use ng-required="true" of required="true" Works like a charm, so it is fixed :)

herman1vdb avatar May 12 '16 10:05 herman1vdb

+1

Dashing-Daniel-Li avatar Jan 24 '18 16:01 Dashing-Daniel-Li