Fix adding tag to entries from other people

I've also limited tag length to 20 chars (and limit adding more than 5 tags at once)
This commit is contained in:
Jeremy Benoist
2023-02-07 21:18:06 +01:00
parent 784bc1393c
commit 242e3feac9
2 changed files with 26 additions and 1 deletions

View File

@ -10,6 +10,8 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
class NewTagType extends AbstractType
{
public const MAX_LENGTH = 40;
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
@ -17,6 +19,7 @@ class NewTagType extends AbstractType
'required' => true,
'attr' => [
'placeholder' => 'tag.new.placeholder',
'max_length' => self::MAX_LENGTH,
],
])
->add('add', SubmitType::class, [