My choice would be jQuery.
Using the selector engine, select the value of the yes/no field and also select
the field that needs to be filled. If value is yes then set the field to
enabled. Else, disabled. You could show/hide as well.
If it needs to be required then you could disable the OK button until there is
'some' value in the field...