Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 110 for max_length (0.05 sec)

  1. tests/test_tutorial/test_query_params_str_validations/test_tutorial002.py

                {
                    "type": "string_too_long",
                    "loc": ["query", "q"],
                    "msg": "String should have at most 50 characters",
                    "input": "q" * 51,
                    "ctx": {"max_length": 50},
                }
            ]
        }
    
    
    def test_openapi_schema(client: TestClient):
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 4.9K bytes
    - Viewed (0)
  2. docs/de/docs/tutorial/query-params-str-validations.md

    {* ../../docs_src/query_params_str_validations/tutorial002_an_py310.py hl[9] *}
    
    Beachten Sie, dass der Defaultwert weiterhin `None` ist, so dass der Parameter weiterhin optional ist.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 24 10:28:19 UTC 2025
    - 19.1K bytes
    - Viewed (0)
  3. docs/pt/docs/tutorial/query-params-str-validations.md

    {* ../../docs_src/query_params_str_validations/tutorial002_an_py310.py hl[9] *}
    
    Perceba que o valor padrão continua sendo `None`, então o parâmetro ainda é opcional.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 18.2K bytes
    - Viewed (0)
  4. docs/ja/docs/tutorial/query-params-str-validations.md

    `Optional` の部分は、エディターによるより良いサポートを可能にします。
    
    ///
    
    そして、さらに多くのパラメータを`Query`に渡すことができます。この場合、文字列に適用される、`max_length`パラメータを指定します。
    
    ```Python
    q: Union[str, None] = Query(default=None, max_length=50)
    ```
    
    これにより、データを検証し、データが有効でない場合は明確なエラーを表示し、OpenAPIスキーマの *path operation* にパラメータを記載します。
    
    ## バリデーションをさらに追加する
    
    パラメータ`min_length`も追加することができます:
    
    {* ../../docs_src/query_params_str_validations/tutorial003.py hl[10] *}
    
    ## 正規表現の追加
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Nov 18 02:25:44 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  5. docs_src/body_fields/tutorial001_py39.py

    from pydantic import BaseModel, Field
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = Field(
            default=None, title="The description of the item", max_length=300
        )
        price: float = Field(gt=0, description="The price must be greater than zero")
        tax: Union[float, None] = None
    
    
    @app.put("/items/{item_id}")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 561 bytes
    - Viewed (0)
  6. docs_src/body_fields/tutorial001_an_py39.py

    from pydantic import BaseModel, Field
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = Field(
            default=None, title="The description of the item", max_length=300
        )
        price: float = Field(gt=0, description="The price must be greater than zero")
        tax: Union[float, None] = None
    
    
    @app.put("/items/{item_id}")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 582 bytes
    - Viewed (0)
  7. tests/test_path.py

                    "input": "fo",
                    "ctx": {"min_length": 3},
                }
            ]
        }
    
    
    def test_path_param_maxlength_foo():
        response = client.get("/path/param-maxlength/foo")
        assert response.status_code == 200
        assert response.json() == "foo"
    
    
    def test_path_param_maxlength_foobar():
        response = client.get("/path/param-maxlength/foobar")
        assert response.status_code == 422
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 20.5K bytes
    - Viewed (1)
  8. src/test/java/jcifs/ntlmssp/NtlmMessageTest.java

        }
    
        @Test
        void testWriteSecurityBuffer() {
            // Test writeSecurityBuffer
            byte[] dest = new byte[8]; // Enough for length, max_length, offset
            byte[] src = "Test".getBytes();
    
            // Test with non-null source array
            int nextOffset = NtlmMessage.writeSecurityBuffer(dest, 0, src);
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.5K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/net/InternetDomainName.java

      /**
       * Maximum length of a full domain name, including separators, and leaving room for the root
       * label. See <a href="http://www.ietf.org/rfc/rfc2181.txt">RFC 2181</a> part 11.
       */
      private static final int MAX_LENGTH = 253;
    
      /**
       * Maximum size of a single part of a domain name. See <a
       * href="http://www.ietf.org/rfc/rfc2181.txt">RFC 2181</a> part 11.
       */
      private static final int MAX_DOMAIN_PART_LENGTH = 63;
    
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 27.9K bytes
    - Viewed (0)
  10. src/test/java/jcifs/dcerpc/msrpc/lsarpcTest.java

            when(mockNdrBuffer.dec_ndr_long()).thenReturn(1, 2);
            // The implementation uses maximum_length/2 for _name_buffers, not length
            when(mockDeferredNdrBuffer.dec_ndr_long()).thenReturn(10, 0, 5); // _name_buffers (max_length/2 = 20/2 = 10), 0, _name_bufferl (5)
            when(mockDeferredNdrBuffer.dec_ndr_short()).thenReturn((int) (short) 'a', (int) (short) 'b', (int) (short) 'c', (int) (short) 'd',
                    (int) (short) 'e');
    
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 60.8K bytes
    - Viewed (0)
Back to top