aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/AnnotationBundle/Entity/Annotation.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2017-06-07 16:30:27 +0200
committerGitHub <noreply@github.com>2017-06-07 16:30:27 +0200
commit7bb3aa31776ffce2735a3b16f6ad80bb17946d4d (patch)
tree5dd6bae023e67731479a8f799f3e00780ac98c56 /src/Wallabag/AnnotationBundle/Entity/Annotation.php
parentc0d756f67d1cc0fc6832d404a09729f9219f0595 (diff)
parentc406cef5b69b0d6c43adef33b5374b209347b637 (diff)
downloadwallabag-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/Annotation.php')
-rw-r--r--src/Wallabag/AnnotationBundle/Entity/Annotation.php7
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;
8use JMS\Serializer\Annotation\VirtualProperty; 8use JMS\Serializer\Annotation\VirtualProperty;
9use JMS\Serializer\Annotation\SerializedName; 9use JMS\Serializer\Annotation\SerializedName;
10use JMS\Serializer\Annotation\Groups; 10use JMS\Serializer\Annotation\Groups;
11use Symfony\Component\Validator\Constraints as Assert;
11use Wallabag\UserBundle\Entity\User; 12use Wallabag\UserBundle\Entity\User;
12use Wallabag\CoreBundle\Entity\Entry; 13use 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 */