zendframework/zend-validator
Powerful validation library from Zend Framework for PHP apps. Provides a wide range of reusable validators, input filtering, and custom rule support with clear error messages. Integrates easily into forms and domain validation workflows.
Zend\Validator\Uuid allows validating Universally Unique IDentifiers
(UUIDs). UUIDs are 128-bit values that are guaranteed to be "practically unique"
in order to help prevent identifier conflicts. Five separate UUID versions
exist:
The Uuid validator is capable of validating whether a string is a valid UUID
of any version. It does not validate that the UUID exists in your system,
however, only that it is well-formed.
Introduced in 2.8.0
Zend\Validator\Uuidwas introduced with version 2.8.0.
The Uuid validator has no additional options.
$validator = new Zend\Validator\Uuid();
if ($validator->isValid($uuid)) {
// UUID was valid
} else {
// Invalid/mal-formed UUID; use $validator->getMessages() for more detail
}
How can I help you explore Laravel packages today?