Results of 1 - 2 of about 2 for pattern (0.004 sec.)
- クエリパラメータと文字列の検証 11228
- クエリパラメータと文字列の検証 FastAPI ではパラメータの追加情報とバリデーションを宣言することができます。 以下のアプリケーションを例にしてみましょう: Python 3.8+ from typing import Union from fastapi import FastAPI app = FastAPI () @app . g
..."/items/" ) async def read_items ( q : Union [ str , None ] = Query ( default = None , min_length = 3 , max_length = 50 , pattern = "^fixedquery$" ), ): results = { "items" : [{ "item_id" : "Foo" }, { "item_id" : "Bar" }]} if q : results . update ({ "q...() @app . get ( "/items/" ) async def read_items ( q : Annotated [ str | None , Query ( min_length = 3 , max_length = 50 , pattern = "^fixedquery$" ) ] = None , ): results = { "items" : [{ "item_id" : "Foo" }, { "item_id" : "Bar" }]} if q : results . up...get ( "/items/" ) async def read_items ( q : Annotated [ Union [ str , None ], Query ( min_length = 3 , max_length = 50 , pattern = "^fixedquery$" ) ] = None , ): results = { "items" : [{ "item_id" : "Foo" }, { "item_id" : "Bar" }]} if q : results . up... - https://man.mtool.work/fastapi/0.115/tutorial/query-params-str-validations/
- Release Notes 7485
- Release Notes Latest Changes 0.115.11 Fixes ? Add docs examples and tests (support) for Annotated custom validations, like AfterValidator , revert #13440 . PR #13442 by @tiangolo . New docs: Query Parameters and String Validations - Custom
...while upgrading to Starlette 0.31.1. PR #10194 by @tiangolo . Docs ✏️ Fix validation parameter name in docs, from regex to pattern . PR #10085 by @pablodorrio . ✏️ Fix indent format in docs/en/docs/deployment/server-workers.md . PR #10066 by @tamtam-fit...json_schema_extra ...you can read about them in the Pydantic docs. The parameter regex has been deprecated and replaced by pattern . You can read more about it in the docs for Query Parameters and String Validations: Add regular expressions . New Pydant... - https://man.mtool.work/fastapi/0.115/release-notes/
PREV
1
NEXT