def unique_email(form, field):
    if User.query.filter_by(email=field.data).first():
        raise ValidationError('Email is already registered.')

def unique_username(form, field):
    if User.query.filter_by(username=field.data).first():
        raise ValidationError('Username is already registered.')

@auth.route('/register', methods=['POST'])
def register():
    pass
Using flask wtforms validators without using a form