<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def validate(self):
 """Validate process descriptor."""

        required_fields = ('slug', 'name', 'process_type', 'version')
        for field in required_fields:
            if getattr(self.metadata, field, None) is None:
                raise ValidationError("process '{}' is missing required meta attribute: {}".format(
                    self.metadata.slug or '<unknown>', field))

        if not PROCESSOR_TYPE_RE.match(self.metadata.process_type):
            raise ValidationError("process '{}' has invalid type: {}".format(
                self.metadata.slug, self.metadata.process_type))