Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 84 for Validation (0.31 sec)

  1. docs/zh/docs/tutorial/handling-errors.md

                ],
                "msg": "value is not a valid integer",
                "type": "type_error.integer"
            }
        ]
    }
    
    ```
    
    被替换为了以下文本格式的错误信息:
    
    ```
    1 validation error
    path -> item_id
      value is not a valid integer (type=type_error.integer)
    
    ```
    
    ### `RequestValidationError` vs `ValidationError`
    
    !!! warning "警告"
    
        如果您觉得现在还用不到以下技术细节,可以先跳过下面的内容。
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Mar 22 01:42:11 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  2. docs/zh/docs/tutorial/query-params-str-validations.md

        "bar"
      ]
    }
    ```
    
    !!! tip
        要声明类型为 `list` 的查询参数,如上例所示,你需要显式地使用 `Query`,否则该参数将被解释为请求体。
    
    交互式 API 文档将会相应地进行更新,以允许使用多个值:
    
    <img src="https://fastapi.tiangolo.com/img/tutorial/query-params-str-validations/image02.png">
    
    ### 具有默认值的查询参数列表 / 多个值
    
    你还可以定义在没有任何给定值时的默认 `list` 值:
    
    ```Python hl_lines="9"
    {!../../../docs_src/query_params_str_validations/tutorial012.py!}
    ```
    
    如果你访问:
    
    ```
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Mar 22 01:42:11 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  3. docs/ko/docs/tutorial/query-params-str-validations.md

      ]
    }
    ```
    
    !!! tip "팁"
        위의 예와 같이 `list` 자료형으로 쿼리 매개변수를 선언하려면 `Query`를 명시적으로 사용해야 합니다. 그렇지 않으면 요청 본문으로 해석됩니다.
    
    대화형 API 문서는 여러 값을 허용하도록 수정 됩니다:
    
    <img src="/img/tutorial/query-params-str-validations/image02.png">
    
    ### 쿼리 매개변수 리스트 / 기본값을 사용하는 다중값
    
    그리고 제공된 값이 없으면 기본 `list` 값을 정의할 수도 있습니다:
    
    ```Python hl_lines="9"
    {!../../../docs_src/query_params_str_validations/tutorial012.py!}
    ```
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sun Feb 11 13:48:31 UTC 2024
    - 9.6K bytes
    - Viewed (0)
  4. docs/pt/docs/tutorial/path-params-numeric-validations.md

    ```
    
    ## Recapitulando
    
    Com `Query`, `Path` (e outras que você ainda não viu) você pode declarar metadados e validações de texto do mesmo modo que com [Parâmetros de consulta e validações de texto](query-params-str-validations.md){.internal-link target=_blank}.
    
    E você também pode declarar validações numéricas:
    
    * `gt`: maior que (`g`reater `t`han)
    * `ge`: maior que ou igual (`g`reater than or `e`qual)
    * `lt`: menor que (`l`ess `t`han)
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Oct 17 05:59:11 UTC 2023
    - 5.6K bytes
    - Viewed (0)
  5. docs/zh/docs/tutorial/path-params-numeric-validations.md

    对于 <abbr title="less than"><code>lt</code></abbr> 也是一样的。
    
    ```Python hl_lines="11"
    {!../../../docs_src/path_params_numeric_validations/tutorial006.py!}
    ```
    
    ## 总结
    
    你能够以与 [查询参数和字符串校验](query-params-str-validations.md){.internal-link target=_blank} 相同的方式使用 `Query`、`Path`(以及其他你还没见过的类)声明元数据和字符串校验。
    
    而且你还可以声明数值校验:
    
    * `gt`:大于(`g`reater `t`han)
    * `ge`:大于等于(`g`reater than or `e`qual)
    * `lt`:小于(`l`ess `t`han)
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Oct 17 05:59:11 UTC 2023
    - 6.3K bytes
    - Viewed (0)
  6. docs/ja/docs/tutorial/path-params-numeric-validations.md

    ```Python hl_lines="11"
    {!../../../docs_src/path_params_numeric_validations/tutorial006.py!}
    ```
    
    ## まとめ
    
    `Query`と`Path`(そしてまだ見たことない他のもの)では、[クエリパラメータと文字列の検証](query-params-str-validations.md){.internal-link target=_blank}と同じようにメタデータと文字列の検証を宣言することができます。
    
    また、数値のバリデーションを宣言することもできます:
    
    * `gt`: より大きい(`g`reater `t`han)
    * `ge`: 以上(`g`reater than or `e`qual)
    * `lt`: より小さい(`l`ess `t`han)
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Mon Jan 15 15:46:32 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  7. docs/em/docs/tutorial/path-params-numeric-validations.md

    ```Python hl_lines="11"
    {!../../../docs_src/path_params_numeric_validations/tutorial006.py!}
    ```
    
    ## 🌃
    
    ⏮️ `Query`, `Path` (&amp; 🎏 👆 🚫 👀) 👆 💪 📣 🗃 &amp; 🎻 🔬 🎏 🌌 ⏮️ [🔢 🔢 &amp; 🎻 🔬](query-params-str-validations.md){.internal-link target=_blank}.
    
    &amp; 👆 💪 📣 🔢 🔬:
    
    * `gt`: `g`🅾 `t`👲
    * `ge`: `g`🅾 🌘 ⚖️ `e`🅾
    * `lt`: `l`👭 `t`👲
    * `le`: `l`👭 🌘 ⚖️ `e`🅾
    
    !!! info
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Apr 01 09:26:04 UTC 2023
    - 4.4K bytes
    - Viewed (0)
  8. docs/es/docs/tutorial/cookie-params.md

    ## Declarar parámetros de `Cookie`
    
    Luego declara los parámetros de cookie usando la misma estructura que con `Path` y `Query`.
    
    El primer valor es el valor por defecto, puedes pasar todos los parámetros adicionales de validación o anotación:
    
    === "Python 3.10+"
    
        ```Python hl_lines="9"
        {!> ../../../docs_src/cookie_params/tutorial001_an_py310.py!}
        ```
    
    === "Python 3.9+"
    
        ```Python hl_lines="9"
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Apr 19 19:30:26 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  9. docs/es/docs/benchmarks.md

        * Si no usaras FastAPI y usaras Starlette directamente (u otra herramienta, como Sanic, Flask, Responder, etc.), tendrías que implementar toda la validación y serialización de datos tu mismo. Por lo tanto, tu aplicación...
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Wed Feb 07 11:39:50 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  10. docs/es/docs/tutorial/path-params.md

    !!! check "Revisa"
        Así, con la misma declaración de tipo de Python, **FastAPI** te da validación de datos.
    
        Observa que el error también muestra claramente el punto exacto en el que no pasó la validación.
    
        Esto es increíblemente útil cuando estás desarrollando y debugging código que interactúa con tu API.
    
    ## Documentación
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Mar 22 01:42:11 UTC 2024
    - 9.4K bytes
    - Viewed (0)
Back to top