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
[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
When an input element has a min value on it, it seems this validator is ignored.
@SteveVanOpstal Yeah, I think that is indeed the issue.
the validator itself should be doing the right thing. I was looking at the wrong spot! good catch!
@SteveVanOpstal Thanks for pointing that out, I do apologize for my mistake, I remember seeing this when I was making the validator since it was half copy pasted from another old PR (which specifically included this part) I am unsure why I did not change it then, I thought I had.
Anyway, sorry for any inconvenience this has caused
Activity
SteveVanOpstal commentedon May 29, 2017
Only four Validator directives exist:
So a
minvalidator should be made with a custom implementation of Validator.You can make it yourself: https://stackoverflow.com/a/39848327/531122
Or use a library (like https://github.com/yuyang041060120/ng2-validation) to do it for you.
Although it is marked as experimental, documentation is lacking on this.
SanderElias commentedon May 29, 2017
@SteveVanOpstal documentation of min validator.
SteveVanOpstal commentedon May 29, 2017
The Plunker got me confused as it is loading Angular 4.1.3. I modified the Plunker to version 4.2.0-rc.1 and I am debugging it now. It could have something to do with
MinValidatorusingParseInt(See https://github.com/angular/angular/blob/4.2.0-rc.1/packages/forms/src/directives/validators.ts#L133).SteveVanOpstal commentedon May 29, 2017
ParseIntseems to be the issue, as it converts the string'0.95'into number0SanderElias commentedon May 29, 2017
@SteveVanOpstal Yeah, I think that is indeed the issue.
the validator itself should be doing the right thing. I was looking at the wrong spot! good catch!
SteveVanOpstal commentedon May 29, 2017
I'm working on a fix and will create a pull request of it
Toxicable commentedon May 30, 2017
@SteveVanOpstal Thanks for pointing that out, I do apologize for my mistake, I remember seeing this when I was making the validator since it was half copy pasted from another old PR (which specifically included this part) I am unsure why I did not change it then, I thought I had.
Anyway, sorry for any inconvenience this has caused
SteveVanOpstal commentedon May 30, 2017
@Toxicable Not a problem, it is fixed now.
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.