From 119ac78fb51cfeba85a256a7be1305cc9188de30 Mon Sep 17 00:00:00 2001 From: dwgebler Date: Thu, 15 Jun 2023 23:31:43 +0100 Subject: [PATCH] add documentation for validating all groups --- validation/groups.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/validation/groups.rst b/validation/groups.rst index 51981375e0e..35f2fb4a7e6 100644 --- a/validation/groups.rst +++ b/validation/groups.rst @@ -173,6 +173,10 @@ as the third argument to the ``validate()`` method:: If no groups are specified, all constraints that belong to the group ``Default`` will be applied. +You can use the special group name ``*`` to validate against all constraints in all groups:: + + $errors = $validator->validate($author, null, ['*']); + In a full stack Symfony project, you'll usually work with validation indirectly through the form library. For information on how to use validation groups inside forms, see :doc:`/form/validation_groups`.