for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Mbright\Validation\Rule\Validate;
use Mbright\Validation\Rule\AbstractUuidCase;
class Uuid extends AbstractUuidCase implements ValidateRuleInterface
{
/**
* Validates that the value is a canonical human-readable UUID.
*
* @param object $subject The subject to be filtered.
* @param string $field The subject field name.
* @return bool True if valid, false if not.
*/
public function __invoke($subject, string $field): bool
return $this->isCanonical($subject->$field);
}