A white list of case-sensitive (optionally insensitive) values.
Any string that looks like a CSS color. Matches hex values such as #123 or #123456, color names such as red (or any string composed of letters from a to z) and CSS rgb() values such as rgb(12, 34, 56).
Dummy filter that systematically invalidates the attribute value.
A decimal value. Uses ext/filter's FILTER_VALIDATE_FLOAT filter. Returns a float, not a string.
A CSS font-family value. More restrictive than the CSS specs. Font names can only contain ASCII letters and digits. They can be quoted and separated by a comma optionally surrounded with spaces.
Requires an associative array that maps strings to their replacement. Case-sensitive. Preserves unknown values by default.
A string of letters, numbers, dashes and underscores. Matches /^[-0-9A-Za-z_]+$/.
An integer value. Uses ext/filter's FILTER_VALIDATE_INT filter. Returns an integer, not a string.
A valid IPv4 or IPv6 address. Uses ext/filter's FILTER_VALIDATE_IP filter.
A valid IPv4 or IPv6 address with a port such as 127.0.0.1:80 or [ff02::1]:80. Uses ext/filter's FILTER_VALIDATE_IP filter for the IP part.
A valid IPv4 address. Uses ext/filter's FILTER_VALIDATE_IP filter with the FILTER_FLAG_IPV4 flag.
A valid IPv6 address. Uses ext/filter's FILTER_VALIDATE_IP filter with the FILTER_FLAG_IPV6 flag.
Requires an associative array that maps strings to their replacement. Case-insensitive by default. Preserves unknown values by default.
A string made of digits. Matches /^[0-9]+$/. Note that unlike #int, "0123" is a valid number. Returns a string.
An integer value, adjusted for given range. Requires a min option and a max option. Uses ext/filter's FILTER_VALIDATE_INT filter. Values outside of range are adjusted to closest valid value. Returns an integer.
A string that matches given regexp. Requires a regexp option.
A string that matches /^[- +,.0-9A-Za-z_]+$/.
An unsigned integer value. Same as #int, but rejects values less than 0.