s-private API Documentation - v3.8.1
    Preparing search index...
    • Validates that a URL string uses HTTP or HTTPS protocol.

      Parameters

      • url: string

        The URL string to validate

      Returns boolean

      true if the URL is valid HTTP/HTTPS or falsy, false otherwise

      Returns true for empty/falsy values to support nullable fields. This allows nullable URL value objects to pass validation when null/undefined.

      isValidHttpUrl("https://example.com"); // true
      isValidHttpUrl("http://example.com"); // true
      isValidHttpUrl("ftp://example.com"); // false
      isValidHttpUrl(""); // true (supports nullable)