laminas/laminas-validator
Laminas Validator provides flexible, reusable validation rules for PHP applications. Includes built-in validators, input filtering/validation chains, and tools for validating common data types like emails, URLs, numbers, strings, and more.
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?