Skip to content

Commit 49049d7

Browse files
Merge pull request #14 from cedricduffournet/add_validation_constraints
Add length constraint in civility entity
2 parents c7349ef + cc05491 commit 49049d7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

app/src/Entity/Civility.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ class Civility implements CivilityInterface
3434
*
3535
* @ORM\Column(name="name", type="string")
3636
* @Assert\NotBlank
37+
* @Assert\Length(
38+
* max = 255
39+
* )
3740
* @Groups({"Default","user_info"})
3841
*/
3942
private $name;
@@ -45,6 +48,9 @@ class Civility implements CivilityInterface
4548
*
4649
* @ORM\Column(name="code", type="string", length=10)
4750
* @Assert\NotBlank
51+
* @Assert\Length(
52+
* max = 10
53+
* )
4854
* @Groups({"Default","user_info"})
4955
*/
5056
private $code;

0 commit comments

Comments
 (0)