def METHOD_NAME(self, email):
    user = User.query.filter_by(email=email.data.lower().strip()).first()
    if user is not None:
        raise ValidationError(
            "There is already a username associated with that email address."
        )