- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 63 for min_length (0.06 seconds)
-
fastapi/params.py
alias=alias, title=title, description=description, gt=gt, ge=ge, lt=lt, le=le, min_length=min_length, max_length=max_length, discriminator=discriminator, multiple_of=multiple_of, allow_inf_nan=allow_inf_nan, max_digits=max_digits, decimal_places=decimal_places,Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 12:54:56 GMT 2025 - 26.3K bytes - Click Count (0) -
fastapi/param_functions.py
serialization_alias=serialization_alias, title=title, description=description, gt=gt, ge=ge, lt=lt, le=le, min_length=min_length, max_length=max_length, pattern=pattern, regex=regex, discriminator=discriminator, strict=strict, multiple_of=multiple_of, allow_inf_nan=allow_inf_nan,Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 12:54:56 GMT 2025 - 63K bytes - Click Count (0) -
tests/main.py
@app.get("/path/param-minlength/{item_id}") def get_path_param_min_length(item_id: str = Path(min_length=3)): return item_id @app.get("/path/param-maxlength/{item_id}") def get_path_param_max_length(item_id: str = Path(max_length=3)): return item_id @app.get("/path/param-min_maxlength/{item_id}") def get_path_param_min_max_length(item_id: str = Path(max_length=3, min_length=2)): return item_id
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 4.5K bytes - Click Count (0) -
tests/test_annotated.py
async def default(foo: Annotated[str, Query()] = "foo"): return {"foo": foo} @app.get("/required") async def required(foo: Annotated[str, Query(min_length=1)]): return {"foo": foo} @app.get("/multiple") async def multiple(foo: Annotated[str, object(), Query(min_length=1)]): return {"foo": foo} @app.get("/unrelated") async def unrelated(foo: Annotated[str, object()]): return {"foo": foo}
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 18:19:10 GMT 2025 - 9.6K bytes - Click Count (0) -
docs_src/query_params_str_validations/tutorial004_py39.py
from typing import Union from fastapi import FastAPI, Query app = FastAPI() @app.get("/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": q})
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 367 bytes - Click Count (0) -
docs_src/query_params_str_validations/tutorial003_py39.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 329 bytes - Click Count (0) -
docs/en/docs/tutorial/query-params-str-validations.md
Generic validations and metadata: * `alias` * `title` * `description` * `deprecated` Validations specific for strings: * `min_length` * `max_length` * `pattern` Custom validations using `AfterValidator`. In these examples you saw how to declare validations for `str` values.
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 20 15:55:38 GMT 2025 - 16.7K bytes - Click Count (0) -
docs_src/query_params_str_validations/tutorial006_py39.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 254 bytes - Click Count (0) -
docs_src/query_params_str_validations/tutorial005_py39.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 276 bytes - Click Count (0) -
docs_src/query_params_str_validations/tutorial008_py39.py
@app.get("/items/") async def read_items( q: Union[str, None] = Query( default=None, title="Query string", description="Query string for the items to search in the database that have a good match", min_length=3, ), ): results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]} if q: results.update({"q": q})
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 466 bytes - Click Count (0)