Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

match uuid patter laravel regex

Validator::extend('uuid', function ($attribute, $value, $parameters, $validator) {
    return preg_match('/[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-(8|9|a|b)[a-f0-9]{3‌​}-[a-f0-9]{12}/', $value);
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #match #uuid #patter #laravel #regex
ADD COMMENT
Topic
Name
8+3 =