sebastianha / angular-bootstrap-checkbox

A checkbox for AngularJS styled to fit the Twitter Bootstrap standard design
MIT License
148 stars 66 forks source link

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

Open sinsunsan opened 9 years ago

sinsunsan commented 9 years ago

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 ?

JonCognioDigital commented 9 years ago

Did you ever get anywhere with this?

sebastianha commented 9 years ago

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

hugsbrugs commented 9 years ago

Yes this feature would be very usefull.

himanshu56 commented 8 years ago

So does it support required now?

sebastianha commented 8 years ago

Currently not, but it is on my roadmap.

himanshu56 commented 8 years ago

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

sebastianha commented 8 years ago

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

himanshu56 commented 8 years ago

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>