From e4b2284d80e932335ec6afb565ed100851a0e82d Mon Sep 17 00:00:00 2001 From: Maxime Renou Date: Thu, 4 Apr 2019 16:09:07 +0200 Subject: [PATCH] 0 now pass required rule --- ValidatorBundle/Validator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ValidatorBundle/Validator.php b/ValidatorBundle/Validator.php index 70edd54..4eea215 100644 --- a/ValidatorBundle/Validator.php +++ b/ValidatorBundle/Validator.php @@ -174,7 +174,7 @@ class Validator public function get($field, $default = null) { $value = isset($this->values[$field]) ? trim($this->values[$field]) : $default; - if (empty($value)) $value = $default; + if (strlen($value) == 0) $value = $default; return $value; }