Project

General

Profile

Actions

Bug #76388

closed

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

Added by Markus Klein almost 8 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
FormEngine aka TCEforms
Target version:
Start date:
2016-05-31
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
no-brainer
Is Regression:
No
Sprint Focus:

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.


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #76392: FormEngine JS validation does not indicate errorsClosedMarkus Klein2016-05-31

Actions
Related to TYPO3 Core - Bug #76219: select with minitems=1 will not issue an error with no selectionClosed2016-05-18

Actions
Actions

Also available in: Atom PDF