diff options
author | adev <adev2000@gmail.com> | 2017-05-07 17:21:30 +0200 |
---|---|---|
committer | adev <adev2000@gmail.com> | 2017-06-04 11:38:29 +0200 |
commit | 2c3e148b0029a094431622feac79fafcd0d43fc8 (patch) | |
tree | f59d3d2088af87f3898b4c4de28639b70efbe4b4 /src/Wallabag/AnnotationBundle/Entity/Annotation.php | |
parent | a687c8d915276eee0c0494156700f7d0c0606735 (diff) | |
download | wallabag-2c3e148b0029a094431622feac79fafcd0d43fc8.tar.gz wallabag-2c3e148b0029a094431622feac79fafcd0d43fc8.tar.zst wallabag-2c3e148b0029a094431622feac79fafcd0d43fc8.zip |
Displays an error with an annotation with a too long quote
Fix #2762
Diffstat (limited to 'src/Wallabag/AnnotationBundle/Entity/Annotation.php')
-rw-r--r-- | src/Wallabag/AnnotationBundle/Entity/Annotation.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Wallabag/AnnotationBundle/Entity/Annotation.php b/src/Wallabag/AnnotationBundle/Entity/Annotation.php index 0838f5aa..c8e41649 100644 --- a/src/Wallabag/AnnotationBundle/Entity/Annotation.php +++ b/src/Wallabag/AnnotationBundle/Entity/Annotation.php | |||
@@ -8,6 +8,7 @@ use JMS\Serializer\Annotation\Exclude; | |||
8 | use JMS\Serializer\Annotation\VirtualProperty; | 8 | use JMS\Serializer\Annotation\VirtualProperty; |
9 | use JMS\Serializer\Annotation\SerializedName; | 9 | use JMS\Serializer\Annotation\SerializedName; |
10 | use JMS\Serializer\Annotation\Groups; | 10 | use JMS\Serializer\Annotation\Groups; |
11 | use Symfony\Component\Validator\Constraints as Assert; | ||
11 | use Wallabag\UserBundle\Entity\User; | 12 | use Wallabag\UserBundle\Entity\User; |
12 | use Wallabag\CoreBundle\Entity\Entry; | 13 | use Wallabag\CoreBundle\Entity\Entry; |
13 | 14 | ||
@@ -56,7 +57,11 @@ class Annotation | |||
56 | /** | 57 | /** |
57 | * @var string | 58 | * @var string |
58 | * | 59 | * |
59 | * @ORM\Column(name="quote", type="string") | 60 | * @Assert\Length( |
61 | * max = 10000, | ||
62 | * maxMessage = "validator.quote_length_too_high" | ||
63 | * ) | ||
64 | * @ORM\Column(name="quote", type="text") | ||
60 | * | 65 | * |
61 | * @Groups({"entries_for_user", "export_all"}) | 66 | * @Groups({"entries_for_user", "export_all"}) |
62 | */ | 67 | */ |