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:
Taylor Otwell 2012-03-12 10:50:04 -05:00
parent ea820add35
commit 5c8527f579
1 changed files with 1 additions and 1 deletions

View File

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