def check_email_valid(email_address, field):
 reason = invalid_email_reason(email_address, field)
 if (reason is not None):
  raise InvalidEmailError(reason)

def check_email_valid ( email_address , field ) : reason = invalid_email_reason ( email_address , field ) if ( reason is not None ) : raise InvalidEmailError ( reason )
check that email is valid .