-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(forms): the
min
and max
validators should work correctly with…
… `0` as a value Prior to this change the `min` and `max` validator directives would not set the `min` and `max` attributes on the host element. The problem was caused by the truthy check in host binding expression that was calculated as `false` when `0` is used as a value. This commit updates the logic to leverage nullish coalescing operator in these host binding expressions, so `0` is treated as a valid value, thus the `min` and `max` attributes are set correctly. Partially closes #42267
- Loading branch information
1 parent
62b5a6c
commit 44e54d1
Showing
3 changed files
with
76 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters