def validate(self):
    errors = []
    for cls in self.OPTIONS:
      if 'validate' in cls.__dict__:
        errors.extend(self.options.view_as(cls).validate(self))
    return errors
Calls validate on subclassess and returns a list of errors.
dataset/ETHPy150Open GoogleCloudPlatform/DataflowPythonSDK/google/cloud/dataflow/utils/pipeline_options_validator.py/PipelineOptionsValidator.validate