Permalink
Browse files

Fix a regression on Validator::check and skipEmpty option

  • Loading branch information...
1 parent 3fcbe36 commit c4c08c5de85ca7793f44bb6fc03be81e0824d88f @mehlah mehlah committed Jan 15, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 util/Validator.php
View
@@ -464,7 +464,7 @@ public static function check(array $values, array $rules, array $options = array
if ($events && $rule['on'] && !array_intersect($events, (array) $rule['on'])) {
continue;
}
- if (!isset($values[$field])) {
+ if (!array_key_exists($field, $values)) {
if ($rule['required']) {
$errors[$field][] = $rule['message'] ?: $key;
}

0 comments on commit c4c08c5

Please sign in to comment.