Permalink
Browse files

minor #3369 Indicate that Group Sequence Providers can use YAML (karp…

…tonite)

This PR was submitted for the 2.4 branch but it was merged into the 2.3 branch instead (closes #3369).

Discussion
----------

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.

Commits
-------

7512b65 Indicate that Group Sequence Providers can use YAML
  • Loading branch information...
weaverryan committed Jan 20, 2014
2 parents 42c80d1 + 08e58c3 commit 7c5a9141d6dd716e692b27904190225be324f332
Showing with 1 addition and 1 deletion.
  1. +1 −1 book/validation.rst
View
@@ -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::

0 comments on commit 7c5a914

Please sign in to comment.