Types of filters
PHP Manual

Validate filters

Listing of filters for validation
ID Name Options Flags Description
FILTER_VALIDATE_BOOLEAN "boolean"   FILTER_NULL_ON_FAILURE

Returns TRUE for "1", "true", "on" and "yes". Returns FALSE otherwise.

If FILTER_NULL_ON_FAILURE is set, FALSE is returned only for "0", "false", "off", "no", and "", and NULL is returned for all non-boolean values.

FILTER_VALIDATE_EMAIL "validate_email"     Validates value as e-mail.
FILTER_VALIDATE_FLOAT "float" decimal FILTER_FLAG_ALLOW_THOUSAND Validates value as float.
FILTER_VALIDATE_INT "int" min_range, max_range FILTER_FLAG_ALLOW_OCTAL, FILTER_FLAG_ALLOW_HEX Validates value as integer, optionally from the specified range.
FILTER_VALIDATE_IP "validate_ip"   FILTER_FLAG_IPV4, FILTER_FLAG_IPV6, FILTER_FLAG_NO_PRIV_RANGE, FILTER_FLAG_NO_RES_RANGE Validates value as IP address, optionally only IPv4 or IPv6 or not from private or reserved ranges.
FILTER_VALIDATE_REGEXP "validate_regexp" regexp   Validates value against regexp, a Perl-compatible regular expression.
FILTER_VALIDATE_URL "validate_url"   FILTER_FLAG_PATH_REQUIRED, FILTER_FLAG_QUERY_REQUIRED Validates value as URL, optionally with required components.

Note: Numbers +0 and -0 are not valid integers but validate as floats.


Types of filters
PHP Manual