Use str_getcsv instead of explode in validator to allow commas in in and not_in rules.
Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
This commit is contained in:
parent
ea820add35
commit
5c8527f579
|
@ -927,7 +927,7 @@ protected function parse($rule)
|
||||||
// "max:3" specifies that the value may only be 3 characters long.
|
// "max:3" specifies that the value may only be 3 characters long.
|
||||||
if (($colon = strpos($rule, ':')) !== false)
|
if (($colon = strpos($rule, ':')) !== false)
|
||||||
{
|
{
|
||||||
$parameters = explode(',', substr($rule, $colon + 1));
|
$parameters = str_getcsv(substr($rule, $colon + 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
return array(is_numeric($colon) ? substr($rule, 0, $colon) : $rule, $parameters);
|
return array(is_numeric($colon) ? substr($rule, 0, $colon) : $rule, $parameters);
|
||||||
|
|
Loading…
Reference in New Issue