Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sinsunsan opened this issue Mar 16, 2015 · 8 comments

Comments

@sinsunsan
Copy link

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 sinsunsan changed the title possibility to use a true checkbox to connect with angular form validation.... use a hidden input type="checkbox" to use angular form validation Mar 16, 2015
@sinsunsan sinsunsan changed the title use a hidden input type="checkbox" to use angular form validation use a hidden input type="checkbox" to conect with angular standard form validation Mar 16, 2015
@JonCognioDigital
Copy link

Did you ever get anywhere with this?

@sebastianha
Copy link
Owner

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

@hugsbrugs
Copy link

Yes this feature would be very usefull.

@himanshu56
Copy link

So does it support required now?

@sebastianha
Copy link
Owner

Currently not, but it is on my roadmap.

@himanshu56
Copy link

himanshu56 commented Jun 6, 2016

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
Copy link
Owner

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

@himanshu56
Copy link

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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants