Issue Bug Closed

#76388FormEngine validation fails to properly set minitems and maxitems for IRRE when min=max=1

Markus Klein 05/31/16, 12:18 updated 10/02/18, 11:10

Description

\TYPO3\CMS\Backend\Form\AbstractNode::getValidationDataAsJsonString()

contains this code:

            if ($config['renderType'] !== 'selectTree' && $maxItems <= 1 && $minItems > 0) {
                $validationRules[] = array(
                    'type' => $type,
                    'minItems' => 1,
                    'maxItems' => 100000
                );
            } else {
                $validationRules[] = array(
                    'type' => $type,
                    'minItems' => $minItems,
                    'maxItems' => $maxItems
                );
            }

which is also called for inline records.
TCA type inline has no “renderType” definition, hence the first if branch is entered for the case when min=max=1.

Reviews 2