diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2017-06-07 16:30:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-07 16:30:27 +0200 |
commit | 7bb3aa31776ffce2735a3b16f6ad80bb17946d4d (patch) | |
tree | 5dd6bae023e67731479a8f799f3e00780ac98c56 /src/Wallabag/AnnotationBundle/Entity | |
parent | c0d756f67d1cc0fc6832d404a09729f9219f0595 (diff) | |
parent | c406cef5b69b0d6c43adef33b5374b209347b637 (diff) | |
download | wallabag-7bb3aa31776ffce2735a3b16f6ad80bb17946d4d.tar.gz wallabag-7bb3aa31776ffce2735a3b16f6ad80bb17946d4d.tar.zst wallabag-7bb3aa31776ffce2735a3b16f6ad80bb17946d4d.zip |
Merge pull request #3093 from aaa2000/annotation-error-on-save
Displays an error with an annotation with a too long quote
Diffstat (limited to 'src/Wallabag/AnnotationBundle/Entity')
-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 | */ |