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
Validator.minLength does not work with input type number #15053
[x ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
Current behavior
The build in validator for minLength works for input with type text, email, etc. However, its not working with type number. The value when inspecting valueChanges is a number, so I'm guessing its because number does not have a .length method.
Expected behavior
minLength validator should return true for any number which length in character count (number.toString() ?) is bigger than provided value, or false otherwise.
Minimal reproduction of the problem with instructions
What is the motivation / use case for changing the behavior?
The validator should work regardless of the type of input field used.
Please tell us about your environment:
Mac, chrome, npm.
Angular version: 2.0.X
2.4.0
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
changed the title [-]Validators.minLength does not work with input type number[/-][+]Validator.minLength does not work with input type number[/+]on Mar 9, 2017
Activity
[-]Validators.minLength does not work with input type number[/-][+]Validator.minLength does not work with input type number[/+]DzmitryShylovich commentedon Mar 9, 2017
You are looking for this #13688
mhevery commentedon Dec 19, 2017
resolved #13688
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.