-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Loosen validator directives selectors #51248
Comments
This is an interesting case. Currently the presence of the Having said this other existing validator directives don't have the |
Changing a selector to drop |
This feature request is now candidate for our backlog! In the next phase, the community has 60 days to upvote. If the request receives more than 20 upvotes, we'll move it to our consideration list. You can find more details about the feature request process in our documentation. |
Just a heads up that we kicked off a community voting process for your feature request. There are 20 days until the voting process ends. Find more details about Angular's feature request process in our documentation. |
Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage. We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular's scope, we'd encourage you to collaborate with the community on publishing it as an open source package. You can find more details about the feature request process in our documentation. |
The solution for this is likely what #56226 proposes: allow to use the Validator directives as host directives. |
Which @angular/* package(s) are relevant/related to the feature request?
forms
Description
I have created few custom input components which are basically wrappers around other controls, and they could use validators like
[min]
,[max]
, ... but I noticed that the selectors forMaxValidator
areinput[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]
and this prohibits the usage on external components.Proposed solution
Changing specific selectors to just
[max][formControlName],[max][formControl],[max][ngModel]
would allow using them everywhere. I have created a custom directive inheriting from the original directive and it works straight out of the box.Alternatives considered
None
The text was updated successfully, but these errors were encountered: