Hi,
could you please explain your requirement in detail. so that other will be able to provide you the validation steps
whether your requirement is the G/L in set XXX and cost centers in the set yyy combination should not be used ?
if yes, the check condition should be G/L are not in set xxx
when you say without G/L, whether GL account should be used for the postings ? than condition should be GL <> "
your validation only will come into picture if any G/L is used in posting than the system will allow only those GL maintained in the set.