- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for Max (0.14 sec)
-
docs/ko/docs/tutorial/query-params-str-validations.md
= Query(None) ``` 그리고 `None`을 사용하여 쿼라 매개변수가 필수적이지 않다는 것을 파악합니다. `Optional` 부분은 편집기에게 더 나은 지원을 제공하기 위해서만 사용됩니다. 또한 `Query`로 더 많은 매개변수를 전달할 수 있습니다. 지금의 경우 문자열에 적용되는 `max_length` 매개변수입니다: ```Python q: str = Query(None, max_length=50) ``` 이는 데이터를 검증할 것이고, 데이터가 유효하지 않다면 명백한 오류를 보여주며, OpenAPI 스키마 *경로 작동*에 매개변수를 문서화 합니다. ## 검증 추가 매개변수 `min_length` 또한 추가할 수 있습니다: ```Python hl_lines="9"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sun Feb 11 13:48:31 GMT 2024 - 9.6K bytes - Viewed (0) -
docs/en/docs/tutorial/query-params-str-validations.md
But now, having `Query(max_length=50)` inside of `Annotated`, we are telling FastAPI that we want it to extract this value from the query parameters (this would have been the default anyway 🤷) and that we want to have **additional validation** for this value (that's why we do this, to get the additional validation). 😎 FastAPI will now: * **Validate** the data making sure that the max length is 50 characters
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 25.7K bytes - Viewed (0) -
docs/fr/docs/tutorial/query-params-str-validations.md
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Jul 27 18:53:21 GMT 2023 - 9.8K bytes - Viewed (0) -
docs/ja/docs/tutorial/query-params-str-validations.md
``` そして、 `None` を利用することでクエリパラメータが必須ではないと検知します。 `Optional` の部分は、エディターによるより良いサポートを可能にします。 そして、さらに多くのパラメータを`Query`に渡すことができます。この場合、文字列に適用される、`max_length`パラメータを指定します。 ```Python q: Union[str, None] = Query(default=None, max_length=50) ``` これにより、データを検証し、データが有効でない場合は明確なエラーを表示し、OpenAPIスキーマの *path operation* にパラメータを記載します。 ## バリデーションをさらに追加する パラメータ`min_length`も追加することができます:
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 10.5K bytes - Viewed (1) -
docs/em/docs/tutorial/query-params-str-validations.md
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 11.9K bytes - Viewed (0) -
docs/pt/docs/tutorial/query-params-str-validations.md
O `Union` é apenas para permitir que seu editor de texto lhe dê um melhor suporte. Então, podemos passar mais parâmetros para `Query`. Neste caso, o parâmetro `max_length` que se aplica a textos: ```Python q: str = Query(default=None, max_length=50) ``` Isso irá validar os dados, mostrar um erro claro quando os dados forem inválidos, e documentar o parâmetro na *operação de rota* do esquema OpenAPI..
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 9.3K bytes - Viewed (0) -
docs/zh/docs/tutorial/query-params-str-validations.md
``` ...使得参数可选,等同于: ```Python q: str = None ``` 但是 `Query` 显式地将其声明为查询参数。 然后,我们可以将更多的参数传递给 `Query`。在本例中,适用于字符串的 `max_length` 参数: ```Python q: Union[str, None] = Query(default=None, max_length=50) ``` 将会校验数据,在数据无效时展示清晰的错误信息,并在 OpenAPI 模式的*路径操作*中记录该参数。 ## 添加更多校验 你还可以添加 `min_length` 参数: ```Python hl_lines="10"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 9.2K bytes - Viewed (0) -
docs/ru/docs/tutorial/query-params-str-validations.md
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 38K bytes - Viewed (0) -
docs/de/docs/tutorial/query-params-str-validations.md
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 17:58:59 GMT 2024 - 27.7K bytes - Viewed (0)