Bug #60247
closedeval=>"required" not working with select fields
0%
Description
As a developer, i want to be able to enforce selection of exactly one item in a select field. But currently, it seems impossible to declare a TCA field of type "select" as mandatory. When leaving the field empty and saving the record.
Setting "eval" to "required" is ignored.
'store' => array( 'exclude' => 1, 'label' => 'store', 'config' => array( 'type' => 'select', 'foreign_table' => 'tx_myext_domain_model_store', 'size' => 1, 'autoSizeMax' => 30, 'items' => array( array('', ''), ), 'maxitems' => 1, 'minitems' => 1, 'multiple' => 0, 'eval' => 'required' ), ),
Files
Updated by Markus Klein over 10 years ago
Did you check if this is also a problem on 6.2?
Updated by Moritz Ahl almost 10 years ago
Yes, the Issue is still the same on 6.2.6. eval=required has no effect at all.
Updated by Benni Mack almost 10 years ago
- Status changed from Accepted to Needs Feedback
Eval does not exist for select fields. However, what you're missing is a field to choose a non-empty value.
I suggest you use a multi-select with two selects (similar to fe_group in pages) where you can only select one item).
Updated by Alexander Opitz over 9 years ago
- Status changed from Needs Feedback to Closed
No feedback within the last 90 days => closing this issue.
If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.