简体   繁体   中英

TYPO3 - TCA: required property for type-> 'select'

in an extension, I have an issue with the required select.

I tried to use 'eval' => 'required', in the TCA configuration to make the field of selecting a table required, but in the BE, it's still always not required, and I can save the form even without choosing a table, so maybe it works only with the type 'input'.

how can I fixe that?

This is the 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', );

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM