diff --git a/src/Pluf/Form/Field/Integer.php b/src/Pluf/Form/Field/Integer.php index b9819f1..82264f7 100644 --- a/src/Pluf/Form/Field/Integer.php +++ b/src/Pluf/Form/Field/Integer.php @@ -34,6 +34,7 @@ class Pluf_Form_Field_Integer extends Pluf_Form_Field if ($this->multiple) { return $this->multiClean($value); } else { + if ($value == '') return $value; if (!preg_match('/^[\+\-]?[0-9]+$/', $value)) { throw new Pluf_Form_Invalid(__('The value must be an integer.')); }