angular-bootstrap-checkbox icon indicating copy to clipboard operation
angular-bootstrap-checkbox copied to clipboard

use a hidden input type="checkbox" to conect with angular standard form validation

Open sinsunsan opened this issue 9 years ago • 8 comments

As in your directive, you don't use a hidden checkbox synchronised with the ng-model of the directives, it seems to me difficult to connect to angular common form handling like for example make the submit button submitable and set the checkbox field required...

This stuff is easy with standard form element like input..

Would it be difficult to integrate an hidden checkbox to achieve this ?

sinsunsan avatar Mar 16 '15 22:03 sinsunsan

Did you ever get anywhere with this?

JonCognioDigital avatar May 26 '15 19:05 JonCognioDigital

Hi, I am sorry but I am really busy right now. But I have it on my list.

sebastianha avatar May 27 '15 07:05 sebastianha

Yes this feature would be very usefull.

hugsbrugs avatar Jul 27 '15 08:07 hugsbrugs

So does it support required now?

himanshu56 avatar Jun 05 '16 12:06 himanshu56

Currently not, but it is on my roadmap.

sebastianha avatar Jun 06 '16 20:06 sebastianha

If its not much trouble could you please give a rough timeline? It will be really helpful to decide timeline of my project. Thank You

himanshu56 avatar Jun 06 '16 22:06 himanshu56

Hi, I am very busy right now, but I would be happy for a pull request.

sebastianha avatar Jun 07 '16 07:06 sebastianha

Will try. But here is an alternative suggested using aria but its not working.

ngRequired The boolean required attribute is only valid for native form controls such as input and textarea. To properly indicate custom element directives such as or as required, using ngAria with ngRequired will also add aria-required. This tells accessibility APIs when a custom control is required.

Example <md-checkbox ng-required="val"></md-checkbox> Becomes:

<md-checkbox ng-required="val" aria-required="true"></md-checkbox>

himanshu56 avatar Jun 07 '16 07:06 himanshu56