From 7098dcc397964e464a344f476c348c987c5f79cf Mon Sep 17 00:00:00 2001 From: Rob Date: Tue, 8 Jul 2025 11:07:01 +0000 Subject: [PATCH] Clarify the usage of the `value` variable in the When constraint documentation --- reference/constraints/When.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/reference/constraints/When.rst b/reference/constraints/When.rst index 144c1e3904c..ca45293898c 100644 --- a/reference/constraints/When.rst +++ b/reference/constraints/When.rst @@ -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 `. The ``value`` variable can be used when you want to execute more complex validation based on its value: