Browse Source

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>
Taylor Otwell 12 years ago
parent
commit
5c8527f579
1 changed files with 1 additions and 1 deletions
  1. 1 1
      laravel/validator.php

+ 1 - 1
laravel/validator.php

@@ -927,7 +927,7 @@ class Validator {
 		// "max:3" specifies that the value may only be 3 characters long.
 		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);