From c33f807308094c4c3b0a18d876310877b8aed30f Mon Sep 17 00:00:00 2001 From: Sanskar121543 Date: Sat, 9 May 2026 14:04:30 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Clarify=20required=20query=20par?= =?UTF-8?q?ameter=20that=20can=20be=20None?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/tutorial/query-params-str-validations.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/en/docs/tutorial/query-params-str-validations.md b/docs/en/docs/tutorial/query-params-str-validations.md index 4765b36cbe123..a22b6103a4430 100644 --- a/docs/en/docs/tutorial/query-params-str-validations.md +++ b/docs/en/docs/tutorial/query-params-str-validations.md @@ -222,7 +222,9 @@ So, when you need to declare a value as required while using `Query`, you can si ### Required, can be `None` { #required-can-be-none } -You can declare that a parameter can accept `None`, but that it's still required. This would force clients to send a value, even if the value is `None`. +You can declare that a parameter can accept `None`, while still requiring clients to provide the parameter in the request. + +Keep in mind that HTTP query parameters are sent as strings, so clients cannot directly send Python `None` values. To do that, you can declare that `None` is a valid type but simply do not declare a default value: