API return an error with empty quote

Fix #4137
This commit is contained in:
adev
2019-10-27 18:51:32 +01:00
committed by Jeremy Benoist
parent a406434701
commit 8197f08266
4 changed files with 33 additions and 1 deletions

View File

@ -60,6 +60,7 @@ class Annotation
/**
* @var string
*
* @Assert\NotNull()
* @Assert\Length(
* max = 10000,
* maxMessage = "validator.quote_length_too_high"

View File

@ -18,6 +18,7 @@ class NewAnnotationType extends AbstractType
])
->add('quote', null, [
'empty_data' => null,
'trim' => false,
])
->add('ranges', CollectionType::class, [
'entry_type' => RangeType::class,