diff --git a/src/Kunstmaan/NodeBundle/Entity/AbstractPage.php b/src/Kunstmaan/NodeBundle/Entity/AbstractPage.php index 17d32b0f78..664e948983 100644 --- a/src/Kunstmaan/NodeBundle/Entity/AbstractPage.php +++ b/src/Kunstmaan/NodeBundle/Entity/AbstractPage.php @@ -18,15 +18,17 @@ abstract class AbstractPage extends AbstractEntity implements PageInterface /** * @var string * - * @ORM\Column(type="string") + * @ORM\Column(type="string", length=255) * @Assert\NotBlank() + * @Assert\Length(max=255) */ protected $title; /** * @var string * - * @ORM\Column(type="string", nullable=true, name="page_title") + * @ORM\Column(type="string", nullable=true, name="page_title", length=255) + * @Assert\Length(max=255) */ protected $pageTitle; diff --git a/src/Kunstmaan/NodeBundle/Form/PageAdminType.php b/src/Kunstmaan/NodeBundle/Form/PageAdminType.php index 57c85a22f2..4684e860bf 100644 --- a/src/Kunstmaan/NodeBundle/Form/PageAdminType.php +++ b/src/Kunstmaan/NodeBundle/Form/PageAdminType.php @@ -18,11 +18,15 @@ public function buildForm(FormBuilderInterface $builder, array $options) $builder->add('id', HiddenType::class); $builder->add('title', TextType::class, [ 'label' => 'kuma_node.form.page.title.label', + 'attr' => [ + 'maxlength' => 255, + ], ]); $builder->add('pageTitle', TextType::class, [ 'label' => 'kuma_node.form.page.page_title.label', 'attr' => [ 'info_text' => 'kuma_node.form.page.page_title.info_text', + 'maxlength' => 255, ], ]); }