Skip to content

Commit

Permalink
Remove the Length constraint that messes with FormattedTextareaType i…
Browse files Browse the repository at this point in the history
…nternal constraint
  • Loading branch information
jolelievre committed Jan 6, 2025
1 parent 945911b commit 74f1271
Showing 1 changed file with 0 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Routing\RouterInterface;
use Symfony\Component\Validator\Constraints\Length;
use Symfony\Contracts\Translation\TranslatorInterface;

class DescriptionType extends TranslatorAwareType
Expand Down Expand Up @@ -117,18 +116,6 @@ public function buildForm(FormBuilderInterface $builder, array $options)
'type' => FormattedTextareaType::class,
'options' => [
'limit' => ProductSettings::MAX_DESCRIPTION_LENGTH,
'constraints' => [
new Length([
'max' => ProductSettings::MAX_DESCRIPTION_LENGTH,
'maxMessage' => $this->trans(
'This field cannot be longer than %limit% characters.',
'Admin.Notifications.Error',
[
'%limit%' => ProductSettings::MAX_DESCRIPTION_LENGTH,
]
),
]),
],
],
'label_tag_name' => 'h3',
'modify_all_shops' => true,
Expand Down

0 comments on commit 74f1271

Please sign in to comment.