0 now pass required rule

This commit is contained in:
Maxime Renou 2019-04-04 16:09:07 +02:00
parent 497b1936cb
commit e4b2284d80
1 changed files with 1 additions and 1 deletions

View File

@ -174,7 +174,7 @@ class Validator
public function get($field, $default = null) public function get($field, $default = null)
{ {
$value = isset($this->values[$field]) ? trim($this->values[$field]) : $default; $value = isset($this->values[$field]) ? trim($this->values[$field]) : $default;
if (empty($value)) $value = $default; if (strlen($value) == 0) $value = $default;
return $value; return $value;
} }