Skip to content

Commit

Permalink
minor #3369 Indicate that Group Sequence Providers can use YAML (karp…
Browse files Browse the repository at this point in the history
…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 7c5a914
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion book/validation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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::

Expand Down

0 comments on commit 7c5a914

Please sign in to comment.