Skip to content

Commit 94048f9

Browse files
committed
Merge branch '4.4' into 5.1
* 4.4: Missing Namespace and comment form validation context
2 parents 4ff6a1a + 9ade793 commit 94048f9

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

validation/custom_constraint.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ You can use custom validators like the ones provided by Symfony itself:
110110
.. code-block:: php-annotations
111111
112112
// src/Entity/AcmeEntity.php
113+
namespace App\Entity;
114+
113115
use App\Validator\Constraints as AcmeAssert;
114116
use Symfony\Component\Validator\Constraints as Assert;
115117
@@ -154,6 +156,8 @@ You can use custom validators like the ones provided by Symfony itself:
154156
.. code-block:: php
155157
156158
// src/Entity/AcmeEntity.php
159+
namespace App\Entity;
160+
157161
use App\Validator\Constraints\ContainsAlphanumeric;
158162
use Symfony\Component\Validator\Constraints\NotBlank;
159163
use Symfony\Component\Validator\Mapping\ClassMetadata;
@@ -254,6 +258,8 @@ not to the property:
254258
.. code-block:: php
255259
256260
// src/Entity/AcmeEntity.php
261+
namespace App\Entity;
262+
257263
use App\Validator\Constraints\ProtocolClass;
258264
use Symfony\Component\Validator\Mapping\ClassMetadata;
259265

validation/sequence_provider.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,9 @@ that group are valid, the second group, ``Strict``, will be validated.
149149

150150
You can also define a group sequence in the ``validation_groups`` form option::
151151

152+
// src/Form/MyType.php
153+
namespace App\Form;
154+
152155
use Symfony\Component\Form\AbstractType;
153156
use Symfony\Component\OptionsResolver\OptionsResolver;
154157
use Symfony\Component\Validator\Constraints\GroupSequence;

validation/translations.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ property is not empty, add the following:
2828
.. code-block:: php-annotations
2929
3030
// src/Entity/Author.php
31+
namespace App\Entity;
32+
3133
use Symfony\Component\Validator\Constraints as Assert;
3234
3335
class Author
@@ -67,6 +69,7 @@ property is not empty, add the following:
6769
.. code-block:: php
6870
6971
// src/Entity/Author.php
72+
namespace App\Entity;
7073
7174
// ...
7275
use Symfony\Component\Validator\Constraints\NotBlank;

0 commit comments

Comments
 (0)