Merge pull request #1184 from tenebrousedge/uuid-improvement

Improvement to Validator::uuid
This commit is contained in:
Mark Story 2013-03-15 07:10:20 -07:00
commit 3f94d1d481

View file

@ -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);
}