8000 Merge branch '2.8' into 3.4 · symfony/symfony-docs@088f93a · GitHub
[go: up one dir, main page]

Skip to content

Commit 088f93a

Browse files
committed
M 8000 erge branch '2.8' into 3.4
* 2.8: [Form][Validation] User $user instead of $users Added 'Default' validation group Update Callback.rst
2 parents 43d71e1 + c8094e2 commit 088f93a

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

form/validation_groups.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Validation Groups
1010
If your object takes advantage of :doc:`validation groups </validation/groups>`,
1111
you'll need to specify which validation group(s) your form should use::
1212

13-
$form = $this->createFormBuilder($users, array(
13+
$form = $this->createFormBuilder($user, array(
1414
'validation_groups' => array('registration'),
1515
))->add(...);
1616

@@ -28,4 +28,7 @@ method::
2828
}
2929

3030
In both of these cases, *only* the ``registration`` validation group will
31-
be used to validate the underlying object.
31+
be used to validate the underlying object. To apply the ``registration``
32+
group *and* all constraints that are not in a group, use::
33+
34+
'validation_groups' => array('Default', 'registration')

reference/constraints/Callback.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ Concrete callbacks receive an :class:`Symfony\\Component\\Validator\\Context\\Ex
272272
instance as only argument.
273273

274274
Static or closure callbacks receive the validated object as the first argument
275-
and the :class:`Symfony\\Component\\Validator\\ExecutionContextInterface`
275+
and the :class:`Symfony\\Component\\Validator\\Context\\ExecutionContextInterface`
276276
instance as the second argument.
277277

278278
.. include:: /reference/constraints/_payload-option.rst.inc

0 commit comments

Comments
 (0)
0