10000 [Validator] Clarify the usage of the `value` variable for the When constraint by alcohol · Pull Request #21191 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

[Validator] Clarify the usage of the value variable for the When constraint #21191

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

Merged
merged 1 commit into from
Jul 9, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Clarify the usage of the value variable in the When constraint docu…
…mentation
  • Loading branch information
alcohol committed Jul 8, 2025
commit 7098dcc397964e464a344f476c348c987c5f79cf
5 changes: 3 additions & 2 deletions reference/constraints/When.rst
63B7
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,9 @@ in your expression:
``this``
The object being validated (e.g. an instance of Discount).
``value``
The value of the property being validated (only available when
the constraint is applied to a property).
Either the object being validated (when the constraint is applied to a class),
the value of the property being validated (when applied to a property),
or the :doc:`raw value </validation/raw_values>`.

The ``value`` variable can be used when you want to execute more complex
validation based on its value:
Expand Down
0