mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Merge pull request #1184 from tenebrousedge/uuid-improvement
Improvement to Validator::uuid
This commit is contained in:
commit
3f94d1d481
1 changed files with 1 additions and 1 deletions
|
@ -778,7 +778,7 @@ class Validation {
|
|||
* @return boolean Success
|
||||
*/
|
||||
public static function uuid($check) {
|
||||
$regex = '/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i';
|
||||
$regex = '/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$/';
|
||||
return self::_check($check, $regex);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue