Field required conditionally

Can i put for a field display logic and logic to make it appear and be requied based on a condition

  array (
            'name' => 'questiondate_c',
            'label' => 'LBL_QUESTIONDATE',
            'logic' => [
                    'required' => [
                            'key' => 'required',
                            'modes' => ['edit', 'create'],
                            'params' => [
                                    'fieldDependencies' => [
                                            'tendertype_c'
                                    ],
                                    'activeOnFields' => [
                                            'tendertype_c' => [
                                                     'RFP'
                                                      ],
                                                       ],
                                                        ],
                                                         ]
                                                          ],
            'displayLogic' => [
                    'hide_on_type' => [
                            'key' => 'displayType',
                            'modes' => [
                                    'detail',
                                    'edit',
                                    'create',
                            ],
                            'params' => [
                                    'fieldDependencies' => [
                                             'tendertype_c',
                                    ],
                                    'targetDisplayType' => 'none',
                                    'activeOnFields' => [
                                            'tendertype_c' => ['RFI'],
                                             ]
                                              ]
                                               ]
                                                ]
          ),

i used this code from documentation but display logic only works

It depends where you are adding this, I am speculating that you are adding it to the metadata/detailviewdefs.php file, I have found that “logic” statements work best if they are in the field definition file.

as per here:

Regards

Mark