[英]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.