laminas/laminas-validator
Validation component for PHP and Laminas applications. Provides a wide range of ready-to-use validators (strings, numbers, dates, files, and more), consistent error messages, and an extensible API to create custom validators and input filtering rules.
Laminas\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.
The Uuid validator has no additional options.
$validator = new Laminas\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?