update page now

The Uri\WhatWg\UrlValidationErrorType enum

(PHP 8 >= 8.5.0)

Introduction

The possible validation errors defined in the » WHATWG URL Standard.

Enum synopsis

namespace Uri\WhatWg;
enum UrlValidationErrorType
{
case DomainToAscii ; //Error during the process of converting the domain name to an ASCII string.

case DomainToUnicode ; //Error during the process of converting the domain name to a Unicode string.

case DomainInvalidCodePoint ; //The input's host contains a forbidden domain code point.

case HostInvalidCodePoint ; //An opaque host (in a URL that is not special) contains a forbidden host code point.

case Ipv4EmptyPart ; //An IPv4 address ends with a U+002E (.).

case Ipv4TooManyParts ; //An IPv4 address does not consist of exactly 4 parts.

case Ipv4NonNumericPart ; //An IPv4 address part is not numeric.

case Ipv4NonDecimalPart ; //The IPv4 address contains numbers expressed using hexadecimal or octal digits.

case Ipv4OutOfRangePart ; //An IPv4 address part exceeds 255.

case Ipv6Unclosed ; //An IPv6 address is missing the closing U+005D (]).

case Ipv6InvalidCompression ; //An IPv6 address begins with improper compression.

case Ipv6TooManyPieces ; //An IPv6 address contains more than 8 pieces.

case Ipv6MultipleCompression ; //An IPv6 address is compressed in more than one spot.

case Ipv6InvalidCodePoint ; // An IPv6 address contains a code point that is neither an ASCII hex digit nor a U+003A (:). Or it unexpectedly ends.

case Ipv6TooFewPieces ; //An uncompressed IPv6 address contains fewer than 8 pieces.

case Ipv4InIpv6TooManyPieces ; //An IPv6 address with IPv4 address syntax: the IPv6 address has more than 6 pieces.

case Ipv4InIpv6InvalidCodePoint ; //An IPv6 address with IPv4 address syntax.

case Ipv4InIpv6OutOfRangePart ; //An IPv6 address with IPv4 address syntax: an IPv4 part exceeds 255.

case Ipv4InIpv6TooFewParts ; //An IPv6 address with IPv4 address syntax: an IPv4 address contains too few parts.

case InvalidUrlUnit ; //A code point is found that is not a URL unit.

case SpecialSchemeMissingFollowingSolidus ; //The input’s scheme is not followed by //.

case MissingSchemeNonRelativeUrl ; // The input is missing a scheme, because it does not begin with an ASCII alpha, and either no base URL was provided or the base URL cannot be used as a base URL because it has an opaque path.

case InvalidReverseSoldius ; //The URL has a special scheme and it uses U+005C (\) instead of U+002F (/).

case InvalidCredentials ; //The input includes credentials.

case HostMissing ; //The input has a special scheme, but does not contain a host.

case PortOutOfRange ; //The input’s port is too big.

case PortInvalid ; //The input’s port is invalid.

case FileInvalidWindowsDriveLetter ; // The input is a relative-URL string that starts with a Windows drive letter and the base URL's scheme is file.

case FileInvalidWindowsDriveLetterHost ; //A file: URL's host is a Windows drive letter.

}
add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top