helper function for ValidatorSpecs