Validator::extend('location', function ($attribute, $value, $parameters, $validator) { return preg_match('/^-?d{1,2}.d{6,}s*,s*-?d{1,2}.d{6,}$/', $value); });