Skip to content

Conversation

@crisbeto
Copy link
Member

Resolves the long-standing issue where the required asterisk wasn't being shown in the form field label when using the required validator from Forms.

Note: these changes target v13, because the hasValidator API was introduced in 12.2.0.

Fixes #2574.

@crisbeto crisbeto added P2 The issue is important to a large percentage of users, with a workaround target: major This PR is targeted for the next major release labels Aug 13, 2021
@crisbeto crisbeto added this to the 13.0.0 milestone Aug 13, 2021
@crisbeto crisbeto requested a review from mmalerba August 13, 2021 04:41
@crisbeto crisbeto requested a review from devversion as a code owner August 13, 2021 04:41
@google-cla google-cla bot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Aug 13, 2021
…ator

Resolves the long-standing issue where the required asterisk wasn't being shown in the form field label when using the `required` validator from Forms.

Fixes angular#2574.
@crisbeto crisbeto force-pushed the 2574/required-asterisk branch from b7c69a8 to 4b588d1 Compare August 13, 2021 04:49
@crisbeto crisbeto requested a review from a team as a code owner August 13, 2021 04:49
@josephperrott josephperrott removed the request for review from a team August 13, 2021 18:32
crisbeto added a commit to crisbeto/material2 that referenced this pull request Aug 16, 2021
…ator

Similar to angular#23362. Fixes that the required asterisk wasn't being shown when a chip list is required.
crisbeto added a commit to crisbeto/material2 that referenced this pull request Aug 16, 2021
…ator

Similar to angular#23362. Fixes that the required asterisk wasn't being shown when a chip list is required.
Copy link
Contributor

@mmalerba mmalerba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mmalerba mmalerba added the action: merge The PR is ready for merge by the caretaker label Aug 17, 2021
Copy link
Member

@devversion devversion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

crisbeto added a commit to crisbeto/material2 that referenced this pull request Aug 31, 2021
…dator

Similar to angular#23362. Fixes that the required asterisk wasn't being shown when a select is required.
crisbeto added a commit to crisbeto/material2 that referenced this pull request Aug 31, 2021
…dator

Similar to angular#23362. Fixes that the required asterisk wasn't being shown when a select is required.
zarend pushed a commit that referenced this pull request Sep 7, 2021
…ator (#23379)

Similar to #23362. Fixes that the required asterisk wasn't being shown when a chip list is required.
mmalerba pushed a commit that referenced this pull request Oct 5, 2021
…dator (#23500)

Similar to #23362. Fixes that the required asterisk wasn't being shown when a select is required.
@crisbeto crisbeto added target: rc This PR is targeted for the next release-candidate and removed target: major This PR is targeted for the next major release labels Oct 8, 2021
@mmalerba mmalerba merged commit 69029b4 into angular:master Oct 12, 2021
mmalerba pushed a commit that referenced this pull request Oct 12, 2021
…ator (#23362)

Resolves the long-standing issue where the required asterisk wasn't being shown in the form field label when using the `required` validator from Forms.

Fixes #2574.

(cherry picked from commit 69029b4)
@jlcarmer
Copy link

This is a breaking change incompatible with the material spec. No asterisk probably should have been the default

https://material.io/components/text-fields#:~:text=Required%20text%20indicator

@crisbeto
Copy link
Member Author

This change is primarily for consistency. Before it, you'd get the asterisk with ngModel, but not with formControl, but they should behave the same.

@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 Nov 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement P2 The issue is important to a large percentage of users, with a workaround target: rc This PR is targeted for the next release-candidate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MdInput doesn't set required asterisk when the validator is set in reactive forms

4 participants