Bug #94110

TCA setting minitems + maxitems to 1 causing all validations to fail

Added by Marcel Hanf about 1 month ago. Updated 20 days ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
Backend JavaScript
Target version:
-
Start date:
2021-05-11
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.4
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Tested on TYPO3 v10.4.15 - no third party Extensions installed

For example:

'header' => [
    'config' => [
        'type' => 'input',
        'eval' => 'required'
    ],
],
'image' => [
    'config' => [
        'minitems' => 1,
        'maxitems' => 1
    ]
]
  • Now add a new content element (for example CType = 'textpic' on any page)
  • Select an image
  • Now validation for header or any other validation field will be ignored
  • This is caused by the value 'minitems' => 1 and 'maxitems' => 1
  • This can be reproduced with any TCA field
#1

Updated by D. Kassor about 1 month ago

  • Category set to Backend JavaScript
#2

Updated by Sebastian Swan 21 days ago

I'm having the same issue. I have a content element with several required text fields and a required FAL image field. Once I select an image, the required mark/check for the other fields disappears and I'm able to save the TCA-Form even though they are still empty.

I did a quick check and it seems this was introduced with 10.4.13, as it is still working when I downgrade to 10.4.12.

#3

Updated by Andreas Fernandez 21 days ago

  • Status changed from New to Accepted
#4

Updated by Gerrit Code Review 21 days 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/c/Packages/TYPO3.CMS/+/69265

#5

Updated by Gerrit Code Review 21 days 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/c/Packages/TYPO3.CMS/+/69265

#6

Updated by Gerrit Code Review 20 days ago

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

#7

Updated by Andreas Fernandez 20 days ago

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

Also available in: Atom PDF