def METHOD_NAME(
    monkeypatch: MonkeyPatch, twilio_config: dict[str, str]
):
    # cannot enable 2fa w/o twilio settings
    setenvs_from_dict(
        monkeypatch,
        {
            "LOGIN_REGISTRATION_CONFIRMATION_REQUIRED": "1",
            "LOGIN_REGISTRATION_INVITATION_REQUIRED": "0",
        },
    )
    with pytest.raises(ValidationError) as exc_info:
        LoginSettingsForProduct.create_from_envs(LOGIN_2FA_REQUIRED=1)
    errors: list[ErrorDict] = exc_info.value.errors()
    assert len(errors) == 1
    assert errors[0]["loc"] == ("LOGIN_2FA_REQUIRED",)