- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for lengthOf (0.15 sec)
-
docs/ko/docs/tutorial/query-params-str-validations.md
`Optional` 부분은 편집기에게 더 나은 지원을 제공하기 위해서만 사용됩니다. 또한 `Query`로 더 많은 매개변수를 전달할 수 있습니다. 지금의 경우 문자열에 적용되는 `max_length` 매개변수입니다: ```Python q: str = Query(None, max_length=50) ``` 이는 데이터를 검증할 것이고, 데이터가 유효하지 않다면 명백한 오류를 보여주며, OpenAPI 스키마 *경로 작동*에 매개변수를 문서화 합니다. ## 검증 추가 매개변수 `min_length` 또한 추가할 수 있습니다: ```Python hl_lines="9" {!../../../docs_src/query_params_str_validations/tutorial003.py!} ```
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/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/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" {!../../../docs_src/query_params_str_validations/tutorial003.py!} ``` ## 添加正则表达式
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)