def email_not_taken_validator(email): if User.is_email_taken(email): raise ValidationError("An account for the email already exists.")