21
21
22
22
The Validator component allows you to use very advanced validation rules, but
23
23
it is also really easy to do easy validation tasks. For instance, if you want
24
- to validate a string is at least 10 character long, the only code you need is::
24
+ to validate that a string is at least 10 character long, the only code you need is::
25
25
26
26
use Symfony\Component\Validator\Validation;
27
27
use Symfony\Component\Validator\Constraints\Length;
@@ -42,7 +42,7 @@ Retrieving a Validator Instance
42
42
43
43
The :class: `Symfony\\ Component\\ Validator\\ Validator ` class is the main access
44
44
point of the Validator component. To create a new instance of this class, it
45
- is recommend to use the :class: `Symfony\\ Component\V alidator\V alidation `
45
+ is recommended to use the :class: `Symfony\\ Component\V alidator\V alidation `
46
46
class.
47
47
48
48
You can get a very basic ``Validator `` by calling
@@ -52,8 +52,8 @@ You can get a very basic ``Validator`` by calling
52
52
53
53
$validator = Validation::createValidator();
54
54
55
- The created validator can be used to validate strings, array , numbers, but it
56
- can't validate classes. To be able to do that, you have to configure the ``Validator ``
55
+ The created validator can be used to validate strings, arrays , numbers, but it
56
+ can't validate classes. In order to achieve that, you have to configure the ``Validator ``
57
57
class. To do that, you can use the :class: `Symfony\\ Component\\ Validator\\ ValidatorBuilder `.
58
58
This class can be retrieved by using the
59
59
:method: `Validation::createValidatorBuilder() <Symfony\\ Component\\ Validator\\ Validation::createValidatorBuilder> `
0 commit comments