Skip to content

Commit 0c2ae61

Browse files
Removing the recommended Constraints subdirectory
Since both the Constraint and the Validator are in the same directory, I can't see any reason for putting them into a *sub*directory called `Constraints`. In other words: When keeping the `Constraints` subdirectory, what would be the recommended contents of the `Validator` directory? * If you agree in principle, I'll change the other occurrences too. * If you don't agree (i.e. want to keep the `Constraints` subdirectory), I suggest to rename it to `Constraint`, since all other directory names are singular too.
1 parent f1f44c4 commit 0c2ae61

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

validation/custom_constraint.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ Creating the Constraint Class
1414

1515
First you need to create a Constraint class and extend :class:`Symfony\\Component\\Validator\\Constraint`::
1616

17-
// src/Validator/Constraints/ContainsAlphanumeric.php
18-
namespace App\Validator\Constraints;
17+
// src/Validator/ContainsAlphanumeric.php
18+
namespace App\Validator;
1919

2020
use Symfony\Component\Validator\Constraint;
2121

0 commit comments

Comments
 (0)