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 #1

Updated by Gerrit Code Review almost 8 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48415

Actions #2

Updated by Gerrit Code Review almost 8 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48415

Actions #3

Updated by Gerrit Code Review almost 8 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48415

Actions #4

Updated by Gerrit Code Review almost 8 years ago

Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48451

Actions #5

Updated by Markus Klein almost 8 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #6

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF