Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 153 for _validate (0.41 sec)

  1. fastapi/datastructures.py

            """
            Close the file.
    
            To be awaitable, compatible with async, this is run in threadpool.
            """
            return await super().close()
    
        @classmethod
        def _validate(cls, __input_value: Any, _: Any) -> "UploadFile":
            if not isinstance(__input_value, StarletteUploadFile):
                raise ValueError(f"Expected UploadFile, received: {type(__input_value)}")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 5.1K bytes
    - Viewed (0)
  2. tests/test_datastructures.py

    from fastapi.datastructures import Default
    from fastapi.testclient import TestClient
    
    
    def test_upload_file_invalid_pydantic_v2():
        with pytest.raises(ValueError):
            UploadFile._validate("not a Starlette UploadFile", {})
    
    
    def test_default_placeholder_equals():
        placeholder_1 = Default("a")
        placeholder_2 = Default("a")
        assert placeholder_1 == placeholder_2
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 20 15:55:38 UTC 2025
    - 1.8K bytes
    - Viewed (0)
  3. fastapi/openapi/models.py

                yield cls.validate
    
            @classmethod
            def validate(cls, v: Any) -> str:
                logger.warning(
                    "email-validator not installed, email fields will be treated as str.\n"
                    "To install, run: pip install email-validator"
                )
                return str(v)
    
            @classmethod
            def _validate(cls, __input_value: Any, _: Any) -> str:
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 15.1K bytes
    - Viewed (0)
  4. api/maven-api-core/src/main/java/org/apache/maven/api/services/RepositoryAwareRequest.java

         *
         * @param repositories the list of repositories to validate, may be {@code null}
         * @return the same list if validation passes, or {@code null} if input was {@code null}
         * @throws IllegalArgumentException if the list contains duplicate repositories
         * @throws IllegalArgumentException if the list contains null repository entries
         */
        default List<RemoteRepository> validate(List<RemoteRepository> repositories) {
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Fri Oct 10 07:30:49 UTC 2025
    - 5K bytes
    - Viewed (0)
  5. src/main/java/org/codelibs/fess/app/web/go/GoAction.java

         */
        protected boolean isFileSystemPath(final String url) {
            return ComponentUtil.getProtocolHelper().isFileSystemPath(url);
        }
    
        /**
         * Validates if the URL is safe for redirection.
         *
         * @param url the URL to validate
         * @return true if the URL is valid for redirection, false otherwise
         */
        protected boolean isValidRedirectUrl(final String url) {
    Registered: Sat Dec 20 09:19:18 UTC 2025
    - Last Modified: Thu Dec 11 09:47:03 UTC 2025
    - 9K bytes
    - Viewed (0)
  6. src/main/java/org/codelibs/fess/app/web/admin/design/AdminDesignAction.java

        }
    
        /**
         * Encode the JSP content.
         * @param value The value.
         * @return The encoded value.
         */
        public static String encodeJsp(final String value) {
            return value.replace("<% try{ %>", TRY_STATEMENT)
                    .replace("<% }catch(Exception e){session.invalidate();} %>", CACHE_AND_SESSION_INVALIDATE_STATEMENT);
        }
    Registered: Sat Dec 20 09:19:18 UTC 2025
    - Last Modified: Fri Nov 28 16:29:12 UTC 2025
    - 17.4K bytes
    - Viewed (0)
  7. fess-crawler/src/main/java/org/codelibs/fess/crawler/helper/SitemapsHelper.java

         * @param in the input stream to validate
         * @return true if the stream contains valid sitemap data, false otherwise
         */
        public boolean isValid(final InputStream in) {
            return isValid(in, true);
        }
    
        /**
         * Checks if the given input stream contains valid sitemap data.
         * @param in the input stream to validate
         * @param recursive whether to recursively check compressed files
    Registered: Sat Dec 20 11:21:39 UTC 2025
    - Last Modified: Fri Nov 14 13:19:40 UTC 2025
    - 34.9K bytes
    - Viewed (0)
  8. src/main/java/org/codelibs/fess/app/web/admin/user/AdminUserAction.java

            form.password = null;
            form.confirmPassword = null;
        }
    
        /**
         * Validates LDAP user attribute types using the configured LDAP manager.
         *
         * @param attributes the map of attributes to validate
         * @param throwError callback to report any validation errors
         */
    Registered: Sat Dec 20 09:19:18 UTC 2025
    - Last Modified: Thu Nov 20 13:56:35 UTC 2025
    - 19.3K bytes
    - Viewed (0)
  9. src/main/java/org/codelibs/core/io/FileUtil.java

            return normalizedPath.startsWith(normalizedBase);
        }
    
        /**
         * Validates that a given file is safe and does not attempt path traversal attacks.
         * <p>
         * This is a convenience method that converts File objects to Path and calls
         * {@link #isPathSafe(Path, Path)}.
         * </p>
         *
         * @param fileToCheck the file to validate (must not be {@literal null})
    Registered: Sat Dec 20 08:55:33 UTC 2025
    - Last Modified: Sat Nov 22 11:21:59 UTC 2025
    - 13.1K bytes
    - Viewed (0)
  10. src/main/java/org/codelibs/fess/app/web/admin/group/AdminGroupAction.java

        //                                                                        ============
    
        /**
         * Validates group attributes using LDAP manager.
         *
         * @param attributes the attributes to validate
         * @param throwError the error handler
         */
    Registered: Sat Dec 20 09:19:18 UTC 2025
    - Last Modified: Thu Nov 20 13:56:35 UTC 2025
    - 16K bytes
    - Viewed (0)
Back to top