Ejemplo n.º 1
0
 def validate_email(self, attribute, value):
     """Check that provided email addresses are valid."""
     if not all(map(lambda e: is_email(e), value)):
         raise ValueError(f"Invalid email in DAG email: {value}.")
Ejemplo n.º 2
0
 def validate_owner(self, attribute, value):
     """Check that owner is a valid email address."""
     if not is_email(value):
         raise ValueError(f"Invalid email for task owner: {value}.")