Skip to content

Commit

Permalink
minor #4752 [Book][Validation] clarify group validation (xabbuh)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.5 branch.

Discussion
----------

[Book][Validation] clarify group validation

| Q             | A
| ------------- | ---
| Doc fix?      | no
| New docs?     | no
| Applies to    | 2.5+
| Fixed tickets | part of #4094

This is for item `F` of #4094. Actually, we didn't have anything wrong as long as I didn't miss anything. I only made two little changes to fix a sentence and clarify the legacy API.

Commits
-------

1c79cad clarify group validation
  • Loading branch information
wouterj committed Jan 16, 2015
2 parents 1f343b1 + 1c79cad commit bd7d246
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions book/validation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -856,10 +856,10 @@ as the third argument to the ``validate()`` method::
// If you're using the new 2.5 validation API (you probably are!)
$errors = $validator->validate($author, null, array('registration'));

// If you're using the old 2.4 validation API
// If you're using the old 2.4 validation API, pass the group names as the second argument
// $errors = $validator->validate($author, array('registration'));

If no groups are specified, all constraints that belong in group ``Default``
If no groups are specified, all constraints that belong to the group ``Default``
will be applied.

Of course, you'll usually work with validation indirectly through the form
Expand Down

0 comments on commit bd7d246

Please sign in to comment.