-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[Validator] Update Type constraint, add number, finite-float and finite-number validations
#18527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
6e07c22 to
74c74b7
Compare
|
This PR should fix CI / Build : #18529 |
|
IsFinite != Finite |
|
@OskarStark you're right, I renamed the Validator |
reference/constraints/IsFinite.rst
Outdated
| IsFinite | ||
| ======== | ||
|
|
||
| Validates that a value is a legal finite number. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Validates that a value is a legal finite number. | |
| Validates that a value is a valid finite number. |
…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
…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 ------- c3b5709560 [Validator] Update `Type` constraint, add `number`, `finite-float` and `finite-number` validations
Type constraint, add number, finite-float and finite-number validations
|
I've re write the doc according to all changes done in the initial ticket. |
OskarStark
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After my comment
…d `finite-number` validations
|
Thank you Guillaume. |
Documentation for PR
Typeconstraint, addnumber,finite-floatandfinite-numbervalidations symfony#50907Related to
Typeconstraint considersNANandINFas floats symfony#50782This is my first sf-docs PR, please tell me if I did anything wrong.
Thank you.