From 28c55eac8fc49ec3c791796a4fae79b94781d786 Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Thu, 6 Nov 2025 17:36:47 +0100 Subject: [PATCH] [Validation]: Adding missing `use` Page: https://symfony.com/doc/6.4/form/without_class.html#conditional-constraints --- form/without_class.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/form/without_class.rst b/form/without_class.rst index c0da3c9db5a..9006b9df2c1 100644 --- a/form/without_class.rst +++ b/form/without_class.rst @@ -186,6 +186,8 @@ fields (e.g. a field must not be blank when another field has a certain value). To achieve this, use the ``expression`` option of the :doc:`When constraint ` to reference the other field:: + use Symfony\Component\Validator\Constraints as Assert; + $builder ->add('how_did_you_hear', ChoiceType::class, [ 'required' => true,