Hello. What is the function.php code to make file attachment is required for certain attributes only. For example,
Attribute number 1,
Field name: how
Filed type: select
Option 1: “Instant download”
Option 2: “via link”
Attribute number 2,
Field name: file
Field type: attachment
if I choose “instant download” in attribute number 1, file attachment is required. But if I choose via link, file attachment is not required.