@@ -822,9 +822,13 @@ With this configuration, there are three validation groups:
822822 fields only.
823823
824824To tell the validator to use a specific group, pass one or more group names
825- as thesecond argument to the ``validate() `` method::
825+ as thethird argument to the ``validate() `` method::
826826
827- $errors = $validator->validate($author, array('registration'));
827+ // If you're using the new 2.5 validation API (you probably are!)
828+ $errors = $validator->validate($author, null, array('registration'));
829+
830+ // If you're using the old 2.4 validation API
831+ // $errors = $validator->validate($author, array('registration'));
828832
829833If no groups are specified, all constraints that belong in group ``Default ``
830834will be applied.
@@ -1189,10 +1193,19 @@ it looks like this::
11891193 $emailConstraint->message = 'Invalid email address';
11901194
11911195 // use the validator to validate the value
1196+ // If you're using the new 2.5 validation API (you probably are!)
1197+ $errorList = $this->get('validator')->validate(
1198+ $email,
1199+ $emailConstraint
1200+ );
1201+
1202+ // If you're using the old 2.4 validation API
1203+ /*
11921204 $errorList = $this->get('validator')->validateValue(
11931205 $email,
11941206 $emailConstraint
11951207 );
1208+ */
11961209
11971210 if (count($errorList) == 0) {
11981211 // this IS a valid email address, do something
@@ -1206,13 +1219,13 @@ it looks like this::
12061219 // ...
12071220 }
12081221
1209- By calling ``validateValue `` on the validator, you can pass in a raw value and
1222+ By calling ``validate `` on the validator, you can pass in a raw value and
12101223the constraint object that you want to validate that value against. A full
12111224list of the available constraints - as well as the full class name for each
12121225constraint - is available in the:doc: `constraints reference </reference/constraints >`
12131226section .
12141227
1215- The ``validateValue `` method returns a:class: `Symfony\\ Component\\ Validator\\ ConstraintViolationList `
1228+ The ``validate `` method returns a:class: `Symfony\\ Component\\ Validator\\ ConstraintViolationList `
12161229object, which acts just like an array of errors. Each error in the collection
12171230is a:class: `Symfony\\ Component\\ Validator\\ ConstraintViolation ` object,
12181231which holds the error message on its ``getMessage `` method.