Skip to content

Commit 7512b65

Browse files
committed
Indicate that Group Sequence Providers can use YAML
In the docs, it was unclear that you could use group sequence providers without using annotations. (It took me some trial and error to figure out how to do it.) I've indicated that it can also use YAML, and how to do so. I've never used XML for validation, so I don't feel qualified to add info about XML to the docs.
1 parent c83cca8 commit 7512b65

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

book/validation.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1072,7 +1072,7 @@ Now, change the ``User`` class to implement
10721072
add the
10731073
:method:`Symfony\\Component\\Validator\\GroupSequenceProviderInterface::getGroupSequence`,
10741074
which should return an array of groups to use. Also, add the
1075-
``@Assert\GroupSequenceProvider`` annotation to the class. If you imagine
1075+
``@Assert\GroupSequenceProvider`` annotation to the class (or ``group_sequence_provider: true`` to the YAML). If you imagine
10761076
that a method called ``isPremium`` returns true if the user is a premium member,
10771077
then your code might look like this::
10781078

0 commit comments

Comments
 (0)