|
|
@ -250,14 +250,10 @@ q: str | None = None |
|
|
|
|
|
|
|
But we are now declaring it with `Query`, for example like: |
|
|
|
|
|
|
|
//// tab | Annotated |
|
|
|
|
|
|
|
```Python |
|
|
|
q: Annotated[str | None, Query(min_length=3)] = None |
|
|
|
``` |
|
|
|
|
|
|
|
//// |
|
|
|
|
|
|
|
So, when you need to declare a value as required while using `Query`, you can simply not declare a default value: |
|
|
|
|
|
|
|
{* ../../docs_src/query_params_str_validations/tutorial006_an_py39.py hl[9] *} |
|
|
|