[英]TYPO3 - TCA: required property for type-> 'select'
在扩展中,我对所需的选择有疑问。
我尝试在TCA配置中使用'eval' => 'required',
来使选择表的字段成为必需,但在BE中,它仍然总是不需要的,即使不选择表我也可以保存表单,所以也许它只适用于“输入”类型。
我该如何解决?
这是 TCA:
'name' => array(
'label' => 'LLL:EXT:ext_key/Resources/Private/Language/locallang_db.xlf:tx_ext_domain_model_name.firstname',
'config' => array(
'type' => 'select',
'renderType' => 'selectSingle',
'eval' => 'required',
'items' => array(
'items' => array(
array('LLL:EXT:ext_key/Resources/Private/Language/locallang_db.xlf:tx_ext_domain_model_name.firstname'.choose', 0),
),
'size' => 1,
'maxitems' => 1,
'itemsProcFunc' => 'Vendor\Extension\Utility\ProcFuncUtility->getName', );
select/selectSingle 没有eval
属性(请参阅https://docs.typo3.org/m/typo3/reference-tca/10.4/en-us/ColumnsConfig/Type/selectSingle.html#properties )。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.