Bug #76219

select with minitems=1 will not issue an error with no selection

Added by Robert Vock over 3 years ago. Updated about 3 years ago.

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

0%

TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

I have a TCA select field with minitems=1. When no entry is selected, I get a red exclamation mark in the Tab. But I do not get an exclamation mark infront of the field and I can save the form without warning or error.

The documentation says, that the field would be validated on the server. But it appears it's not.
https://docs.typo3.org/typo3cms/TCAReference/Reference/Columns/Select/Index.html#rendertype

I tried all render-types with no luck.

When using renderType = selectCheckBox, even the red exclamation mark is missing.

I am using TYPO3 7.6.7.


Related issues

Related to TYPO3 Core - Bug #58520: TCA: selection cannot be removed when size=1, minitems=0, maxitems=1 Closed 2014-05-05
Related to TYPO3 Core - Bug #67913: Flexform: Minitems > 0 within section prevents from saving New 2015-07-06
Related to TYPO3 Core - Bug #76388: FormEngine validation fails to properly set minitems and maxitems for IRRE when min=max=1 Closed 2016-05-31

History

#1 Updated by Christian Kuhn over 3 years ago

Confirmed the selectCheckBox case: this is ext:styleguide select_4 of tx_styleguide_required.

Could you add some demo TCA for the first case?

#3 Updated by Robert Vock over 3 years ago

Example TCA:

<?php
$GLOBALS['TCA']['tx_example_domain_model_news']['columns']['category'] = [
    'config' => [
        'type' => 'select',
        'autoSizeMax' => '30',
        'foreign_table' => 'tx_example_domain_model_category',
        'foreign_table_where' => 'AND tx_example_domain_model_category.sys_language_uid IN (0,-1)',
        'minitems' => '1',
        'maxitems' => '9999',
        'MM' => 'tx_example_news_category_mm',
        'multiple' => '0',
        'renderType' => 'selectTree',
        'size' => '10',
        'treeConfig' => [
            'parentField' => 'parent_category',
        ],
    ],
];

#4 Updated by Christian Weiske about 3 years ago

I can confirm that on 7.6.8, too.

In 7.6.10 this issue is fixed, maybe by the fix for #76388.

#5 Updated by Robert Vock about 3 years ago

I also can confirm, that this is fixed in 7.6.10, so it's ok to close this issue.

#6 Updated by Riccardo De Contardi about 3 years ago

  • Status changed from New to Closed

Thank you for your time and findings, I am closing this issue then.

If the issue occurs again, please open a new issue with a reference to this one. Thanks

Also available in: Atom PDF