From 7777a589c6d1dcf4affe4c26714101b8d2e5057d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Thu, 19 Mar 2026 06:01:12 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Auto=20format?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/tutorial/query-params-str-validations.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/en/docs/tutorial/query-params-str-validations.md b/docs/en/docs/tutorial/query-params-str-validations.md index b8748d9588..97bdb266f9 100644 --- a/docs/en/docs/tutorial/query-params-str-validations.md +++ b/docs/en/docs/tutorial/query-params-str-validations.md @@ -228,7 +228,7 @@ To do that, you can declare that `None` is a valid type but simply do not declar {* ../../docs_src/query_params_str_validations/tutorial006c_an_py310.py hl[9] *} -#### Important: Query parameters are always strings +#### Important: Query parameters are always strings { #important-query-parameters-are-always-strings } Even though you can declare a parameter as "required but can be `None`", in practice, query parameters are always received as strings in HTTP. @@ -240,7 +240,7 @@ For example: This will be interpreted as `"null"` (a string), **not** `None`. -#### Recommendation +#### Recommendation { #recommendation } Because query parameters cannot truly represent `None`, this pattern can be confusing in real-world usage. @@ -254,7 +254,7 @@ q: Annotated[str | None, Query(min_length=3)] = None - Or use a request body if you need to explicitly support `None` -#### Summary +#### Summary { #summary } | Declaration | Behavior | | ----------- | -------- |