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

MD-Checkbox required-Attribute not passed to the underlying element #1133

Closed
Sabartius opened this issue Aug 30, 2016 · 1 comment · Fixed by #1137
Closed

MD-Checkbox required-Attribute not passed to the underlying element #1133

Sabartius opened this issue Aug 30, 2016 · 1 comment · Fixed by #1137
Assignees

Comments

@Sabartius
Copy link

Bug, feature request, or proposal:

md-Checkbox should pass "required" to the inner checkbox

What is the expected behavior?

When marking a md-checkbox with required, the underlying input-element should have a "required" attribute.

What is the current behavior?

the required attribute is not passed to the underlying input-element when using md-checkbox

but when using md-input it works

What are the steps to reproduce?

http://plnkr.co/edit/DbPdlyZrfgv3iZsQUNS4?p=preview

What is the use-case or motivation for changing an existing behavior?

The HTML5-Validation of required checkboxes should work, this is especially important when working with indeterminate checkboxes

Which versions of Angular, Material, OS, browsers are affected?

looks like everyone

Is there anything else we should know?

devversion added a commit to devversion/material2 that referenced this issue Aug 30, 2016
* Now forwards the required attribute to the input.
* This allows us to take advantage of the native browser behavior to prevent a form submission.

Fixes angular#1133,
devversion added a commit to devversion/material2 that referenced this issue Sep 6, 2016
* Now forwards the required attribute to the input.
* This allows us to take advantage of the native browser behavior to prevent a form submission.

Fixes angular#1133,
devversion added a commit to devversion/material2 that referenced this issue Sep 9, 2016
* Now forwards the required attribute to the input.
* This allows us to take advantage of the native browser behavior to prevent a form submission.

Fixes angular#1133,
devversion added a commit to devversion/material2 that referenced this issue Sep 20, 2016
* Now forwards the required attribute to the input.
* This allows us to take advantage of the native browser behavior to prevent a form submission.

Fixes angular#1133,
devversion added a commit to devversion/material2 that referenced this issue Sep 21, 2016
* Now forwards the required attribute to the input.
* This allows us to take advantage of the native browser behavior to prevent a form submission.

Fixes angular#1133,
devversion added a commit to devversion/material2 that referenced this issue Sep 22, 2016
* Now forwards the required attribute to the input.
* This allows us to take advantage of the native browser behavior to prevent a form submission.

Fixes angular#1133,
kara pushed a commit that referenced this issue Sep 23, 2016
)

* fix(checkbox, slide-toggle): forward required attribute to input.

* Now forwards the required attribute to the input.
* This allows us to take advantage of the native browser behavior to prevent a form submission.

Fixes #1133,

* Fix linters

* Fix Browserstack test for super old Safari browser.

* Safari 8 does not report input validity in forms, so the tests fail for it..

* No longer use deep import of core
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants