File tree 2 files changed +9
-9
lines changed
2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -88,8 +88,8 @@ Options
88
88
89
89
An encoding or a set of encodings to check against. If you pass an array of
90
90
encodings, the validator will check if the value is encoded in *any * of the
91
- encodings. This option accepts any value that can be passed to
92
- :phpfunction: `mb_detect_encoding `.
91
+ encodings. This option accepts any value that can be passed to the
92
+ :phpfunction: `mb_detect_encoding ` PHP function .
93
93
94
94
.. include :: /reference/constraints/_groups-option.rst.inc
95
95
Original file line number Diff line number Diff line change @@ -19,18 +19,18 @@ Basic Usage
19
19
-----------
20
20
21
21
To use the MacAddress validator, apply it to a property on an object that
22
- will contain a host name.
22
+ can contain a MAC address:
23
23
24
24
.. configuration-block ::
25
25
26
26
.. code-block :: php-attributes
27
27
28
- // src/Entity/Author .php
28
+ // src/Entity/Device .php
29
29
namespace App\Entity;
30
30
31
31
use Symfony\Component\Validator\Constraints as Assert;
32
32
33
- class Author
33
+ class Device
34
34
{
35
35
#[Assert\MacAddress]
36
36
protected string $mac;
@@ -39,7 +39,7 @@ will contain a host name.
39
39
.. code-block :: yaml
40
40
41
41
# config/validator/validation.yaml
42
- App\Entity\Author :
42
+ App\Entity\Device :
43
43
properties :
44
44
mac :
45
45
- MacAddress : ~
@@ -52,7 +52,7 @@ will contain a host name.
52
52
xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
53
53
xsi : schemaLocation =" http://symfony.com/schema/dic/constraint-mapping https://symfony.com/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd" >
54
54
55
- <class name =" App\Entity\Author " >
55
+ <class name =" App\Entity\Device " >
56
56
<property name =" max" >
57
57
<constraint name =" MacAddress" />
58
58
</property >
@@ -61,13 +61,13 @@ will contain a host name.
61
61
62
62
.. code-block :: php
63
63
64
- // src/Entity/Author .php
64
+ // src/Entity/Device .php
65
65
namespace App\Entity;
66
66
67
67
use Symfony\Component\Validator\Constraints as Assert;
68
68
use Symfony\Component\Validator\Mapping\ClassMetadata;
69
69
70
- class Author
70
+ class Device
71
71
{
72
72
// ...
73
73
You can’t perform that action at this time.
0 commit comments