-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…inite-float` and `finite-number` validations (guillaume-a) This PR was merged into the 6.4 branch. Discussion ---------- [Validator] Update `Type` constraint, add `number`, `finite-float` and `finite-number` validations | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | Fix #50782 | License | MIT | Doc PR | symfony/symfony-docs#18527 Contraint `Type(['float'])` can produce positives with INF or NAN. This new types car narrow validation and limit validation to finite numbers. ``` #[Assert\Type(['int', 'finite-float'])] private $value; ``` Thank you for helping me with this one. Commits ------- c3b5709 [Validator] Update `Type` constraint, add `number`, `finite-float` and `finite-number` validations
- Loading branch information
Showing
3 changed files
with
27 additions
and
1 deletion.
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