Mandatory custom fields based on Subject text

Hello All,
We are using the mandatory fields rt-extension at the moment for a simple requirement of custom fields to be filled in for a specific queue.
I have a request for the ability to set mandatory CF if the subject of the ticket contains specific wording. Is there a simple way to implement this like putting the logic in the config fill itself or does it have to occur outside of the config file?

Enables requried entries for core and custom fields

Set($ShowAllCustomFieldsOnMandatoryUpdate, 0);

Build logic here ??

Set( %MandatoryOnTransition,
‘Support-Q’ => {
‘* -> Closed Complete’ => [‘CF.Resolution’, ],
‘* -> Closed Incomplete’ => [‘CF.Resolution’, ],
},
);
1;

Thanks for the help!