From 7512b6549e477e7c481ec11b787d827fe790b7ff Mon Sep 17 00:00:00 2001 From: Daniel Karp Date: Wed, 18 Dec 2013 16:22:05 -0500 Subject: [PATCH] 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. --- book/validation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/validation.rst b/book/validation.rst index ac4bacfdbd3..a59b296e88b 100644 --- a/book/validation.rst +++ b/book/validation.rst @@ -1072,7 +1072,7 @@ Now, change the ``User`` class to implement add the :method:`Symfony\\Component\\Validator\\GroupSequenceProviderInterface::getGroupSequence`, which should return an array of groups to use. Also, add the -``@Assert\GroupSequenceProvider`` annotation to the class. If you imagine +``@Assert\GroupSequenceProvider`` annotation to the class (or ``group_sequence_provider: true`` to the YAML). If you imagine that a method called ``isPremium`` returns true if the user is a premium member, then your code might look like this::