def METHOD_NAME(flask_client):
    user = login(flask_client)
    sl_domain = setup_sl_domain()
    # subdomain can't end with dash (-)
    flask_client.post(
        url_for("dashboard.subdomain_route"),
        data={"form-name": "create", "subdomain": "test-", "domain": sl_domain.domain},
        follow_redirects=True,
    )
    assert CustomDomain.filter_by(user_id=user.id).count() == 0
    # subdomain can't contain underscore (_)
    flask_client.post(
        url_for("dashboard.subdomain_route"),
        data={
            "form-name": "create",
            "subdomain": "test_test",
            "domain": sl_domain.domain,
        },
        follow_redirects=True,
    )
    assert CustomDomain.filter_by(user_id=user.id).count() == 0
    # subdomain must have at least 3 characters
    flask_client.post(
        url_for("dashboard.subdomain_route"),
        data={"form-name": "create", "subdomain": "te", "domain": sl_domain.domain},
        follow_redirects=True,
    )
    assert CustomDomain.filter_by(user_id=user.id).count() == 0