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

Feature: Shows asterisk automatically when input has RequiredValidator in ReactiveForms #4865

Closed
dev054 opened this issue May 29, 2017 · 3 comments

Comments

@dev054
Copy link

dev054 commented May 29, 2017

Bug, feature request, or proposal:

Feature Request.

What is the expected behavior?

Actually there's an property in input called required. I'm wondering if is there any chance to have it built-in in reactive forms? I mean, if an input has the Validators.required it will automatically shows the asterisk indicating that's required. To disallow this behavior people could use [hideRequiredMarker ]="true".

What is the current behavior?

What are the steps to reproduce?

Providing a Plunker (or similar) is the best way to get the team to see your issue.
Plunker template: https://goo.gl/DlHd6U

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

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

Material 2.0.0-beta.6

Is there anything else we should know?

It would help a lot since you wouldn't need to put Validators.required in component and also [required] in template.

@willshowell
Copy link
Contributor

Looks like dupe of #2574

@dev054
Copy link
Author

dev054 commented May 29, 2017

Woops, I didn't see this issue. Thanks @willshowell

@dev054 dev054 closed this as completed May 29, 2017
@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

No branches or pull requests

2 participants