-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[Validator] Add docs for number constraints #11254
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
24d8f34 to
0fd69b6
Compare
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.
Thank you 👍🏻
I left some comments.
dbd9096 to
c5007ae
Compare
* Positive constraint * PositiveOrZero constraint * Negative constraint * NegativeOrZero constraint
b4ca4a2 to
6155df4
Compare
|
Please include your new constraints in reference/constraints.rst, otherwise Sphinx won't be able to build the docs. |
| Parameter Description | ||
| ============================= ================================================ | ||
| ``{{ compared_value }}`` Always zero | ||
| ``{{ compared_value_type }}`` The expected value type |
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.
Not sure if we should include compared_value and compared_value_type here. They are available, but it doesn't make so much sense to me to use them. WDYT?
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.
I am not sure if we haven't added such (if available) parameters for other constraints.
Please help @xabbuh @javiereguiluz
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.
Even if they won't be used frequently, for consistency with the other constraints I'd prefer to keep them. We always try to document all parameters. Thanks.
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.
Great work, thank you! 👍
|
@jschaedl thanks a lot for providing these docs (and the related feature too). Congrats on your first (great) Symfony Docs contribution! |
Feature PR: symfony/symfony#28637
Todo:
NegativeOrZeroconstraint