Bug #101286
openEpic #99669: CKEditor5 Collection
RTE validation broken when field is required
0%
Description
Hey guys,
when declaring a field in TCA as RTE and adding the option required => true
, the validation is broken:
TCA:
'content' => [
'exclude' => true,
'label' => 'LLL:EXT:my_ext/Resources/Private/Language/locallang_db_event.xlf:content.label',
'config' => [
'type' => 'text',
'enableRichtext' => true,
'required' => true,
],
],
SQL schema:
...
content text NULL DEFAULT NULL
...
When creating a new record, the field is not marked as invalid, even as it should be (because of required => true
):
After putting some content in, it gets marked as invalid. Thus the record cannot be saved:
If you need feedback, just reach out. Thanks for looking into this and fixing/support.
Files
Updated by Christoph Erdmann 10 months ago
Just noticed, that the record gets saved, when saving is triggered via onChange => 'reload'
on another property.
Updated by Christoph Erdmann 10 months ago
Update after 12.4.3:
Main issue is fixed. Thanks.
Didn't notice, there was already an issue for that as it is closed (https://forge.typo3.org/issues/100838). Sorry.
Another issue remains:
When the RTE field is 'required' => true
and a new record is created, it is possible to save the record without filling out the required field. The exclamation mark indicator for failed validation is missing in this case to.
When editing an existing record and emptying the field, the validation works as expected.
Updated by Benjamin Franzke 8 months ago
- Related to Bug #100838: RTE field not marked as required added
Updated by Benjamin Franzke 8 months ago
- Related to Bug #98538: FormEngine state not updated anymore with CKEditor5 added
Updated by Georg Ringer about 1 month ago
- Has duplicate Bug #103533: TCA type=text + enableRichtext=true cannot be required added