You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add support for min/max number validation in template driven forms. #23635
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Performance issue
[X] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:
Current behavior
There is no mechanism for basic number validation (min/max) in template driven forms.
Minimal reproduction of the problem with instructions
What is the motivation / use case for changing the behavior?
Certainly the scope of validation should be pretty limited for Angular. However, the fact that #13688 was implemented seems to suggest that min/max are in this limited scope. This also would allow Angular to supply validators that at least match the HTML5 spec (sharing motivation with #16352 although this need not address that particular issue). Furthermore, there is some public demand as seen on StackOverflow and this has even been attempted and approved before but the mechanism used was a breaking change that had to be rolled back.
In order to avoid a breaking change it would seem that either custom attributes are used (easy but does not satisfy #16352) or the user has to add a particular module (or some other boolean flag) to enable the feature (adds complexity).
Environment
Angular version: X.Y.Z
5.2.10
Browser:
- [X] Chrome (desktop) version XX
- [X] Chrome (Android) version XX
- [X] Chrome (iOS) version XX
- [X] Firefox version XX
- [X] Safari (desktop) version XX
- [X] Safari (iOS) version XX
- [X] IE version XX
- [X] Edge version XX
For Tooling issues:
- Node version: N/A
- Platform: N/A
Others:
Activity
kara commentedon May 1, 2018
The existing issue, #16352, encompasses this min/max validation case, so closing this as a dupe.
angular-automatic-lock-bot commentedon Sep 13, 2019
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.