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
bug: ion-input type="number" max and min attribute validation does not work #20163
Thanks for the follow up. I am going to close this as this is not a bug in Ionic Framework. min/max validation for number inputs does not appear to be working for template driven forms in Angular: angular/angular#16352.
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Activity
liamdebeasi commentedon Jan 8, 2020
Thanks for the issue. Can you provide a repo with the code required to reproduce this issue?
shamohai commentedon Jan 9, 2020
ionic 4 angular
I don't have a code repo.
The code cannot be displayed, I cut some pictures.
html:

`
Form Validation: {{ngForm.valid}} Quantity: `min: 2, max: 5, normally it should be a number between [2,5].
The actual situation is this.
Seems to only verify the must, not verify min and max.
tahaerden commentedon Jan 9, 2020
I can confirm the issue.
For text inputs, minlength, maxlength, required etc. works.
For number inputs, required still works. min/max doesn't.
Here is my form html:
`
`
tahaerden commentedon Jan 31, 2020
Any update on this @liamdebeasi ?
blended-ideas commentedon Feb 26, 2020
This is a major issue. Can we get any updates on this?
liamdebeasi commentedon Feb 26, 2020
Thanks for the follow up. I am going to close this as this is not a bug in Ionic Framework. min/max validation for number inputs does not appear to be working for template driven forms in Angular: angular/angular#16352.
I have created an example here showing the same behavior using an Angular app without Ionic Framework: https://stackblitz.com/edit/angular-input-min-max?file=src/app/app.component.html
ionitron-bot commentedon Mar 27, 2020
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.