Closed davidskaraboo closed 7 years ago
Duplicate of #305
To resume, it seems there is a bug in CKEditor as the bundle renders the HTML5 required attribute and then, CKEditor removes it from the DOM and don't do anything with it...
you can add a constraint to form builder:
$builder->add('description', CKEditorType::class, [
'label' => 'Description',
'config' => ['toolbar' => 'basic'],
'required' => true,
'constraints'=>[
new NotBlank(),
]
])
Hi mates! I am adding the required attribute in form type but doesn't appear in the textarea.... some solution?
Symfony 3.4
The code: