Skip to content

Commit dabb2d9

Browse files
committed
[Validator] Misc tweaks in MacAddress and Charset constraints
1 parent b80bbc7 commit dabb2d9

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

reference/constraints/Charset.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ Options
8888

8989
An encoding or a set of encodings to check against. If you pass an array of
9090
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.
9393

9494
.. include:: /reference/constraints/_groups-option.rst.inc
9595

reference/constraints/MacAddress.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@ Basic Usage
1919
-----------
2020

2121
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:
2323

2424
.. configuration-block::
2525

2626
.. code-block:: php-attributes
2727
28-
// src/Entity/Author.php
28+
// src/Entity/Device.php
2929
namespace App\Entity;
3030
3131
use Symfony\Component\Validator\Constraints as Assert;
3232
33-
class Author
33+
class Device
3434
{
3535
#[Assert\MacAddress]
3636
protected string $mac;
@@ -39,7 +39,7 @@ will contain a host name.
3939
.. code-block:: yaml
4040
4141
# config/validator/validation.yaml
42-
App\Entity\Author:
42+
App\Entity\Device:
4343
properties:
4444
mac:
4545
- MacAddress: ~
@@ -52,7 +52,7 @@ will contain a host name.
5252
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5353
xsi:schemaLocation="http://symfony.com/schema/dic/constraint-mapping https://symfony.com/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd">
5454
55-
<class name="App\Entity\Author">
55+
<class name="App\Entity\Device">
5656
<property name="max">
5757
<constraint name="MacAddress"/>
5858
</property>
@@ -61,13 +61,13 @@ will contain a host name.
6161
6262
.. code-block:: php
6363
64-
// src/Entity/Author.php
64+
// src/Entity/Device.php
6565
namespace App\Entity;
6666
6767
use Symfony\Component\Validator\Constraints as Assert;
6868
use Symfony\Component\Validator\Mapping\ClassMetadata;
6969
70-
class Author
70+
class Device
7171
{
7272
// ...
7373

0 commit comments

Comments
 (0)