Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for clear_ (0.14 sec)

  1. docs/en/docs/tutorial/query-params-str-validations.md

    FastAPI will now:
    
    * **Validate** the data making sure that the max length is 50 characters
    * Show a **clear error** for the client when the data is not valid
    * **Document** the parameter in the OpenAPI schema *path operation* (so it will show up in the **automatic docs UI**)
    
    ## Alternative (old) `Query` as the default value
    
    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)
  2. docs/pt/docs/tutorial/query-params-str-validations.md

    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..
    
    ## Adicionando mais validações
    
    Você também pode incluir um parâmetro `min_length`:
    
    ```Python hl_lines="10"
    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)
Back to top