Validate (class)

Simple class for validation.

Methods

assoc($array) static

Check whether or not an array is associative. Array is considered to be an associative array when keys are not the same as indexes.

email($email) static

Check if string is a valid email address. Uses filter_var().

FQDN($domain, $allow_wildcard = false) static

Validate string as Fully Qualified Domain Name (FQDN).

slug($slug) static

Validate simple slug. Allow only lower case ascii letters, numbers and underscore.

UUID($uuid) static

Validate UUID.