is it possible to set unrequired to the field using deluge script.?

is it possible to set unrequired to the field using deluge script.?

How to set field as unrequired in deluge script ?

i have a field , some time it show and some times it hide , i want to make this field as required when it shows and make this field as unrequired when it hide .