Repository navigation
feat(forms) Add validators min and max with their tests. - #13688
AnObstacle wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
mistake of new FormControl(undefined)?
There was a problem hiding this comment.
Maybe, I confess I just copy and past the tests for minlength and maxlength. Then i change them to use the min and max function I have created.
Do I also change the null to undefined in the others tests?
There was a problem hiding this comment.
I think you don't have to touch other tests.
There was a problem hiding this comment.
Ok, then it is done.
|
@kara do we want to keep this? If so we would need to resurrect this PR, get it to pass and rebase. |
| expect(Validators.min(2)(new FormControl(3))).toBeNull(); | ||
| }); | ||
|
|
||
| it('should not error on equals values', () => { |
There was a problem hiding this comment.
Typo: equals -> equal (same on line 185)
|
|
||
| /** | ||
| * Validator that requires controls to have a value of a minimum number. | ||
| */ |
There was a problem hiding this comment.
This currently only works with reactive forms. Can we add the corresponding directives that provide these validators?
|
@Mathou54 can you please update the commit message so it will automatically close #15053 ? thanks |
|
Looks like this PR has become stale :(. I'm going to close for now since there is another PR for this feature that is more active. |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
What kind of change does this PR introduce? (check one with "x")
What is the new behavior?
Add min max validation for numeric input (like min max in html input)
Does this PR introduce a breaking change? (check one with "x")