public function check() { if (!$this->required && !$this->value) { return; } $error = parent::check(); if ($error) { return $error; } if ((int) $this->value != $this->value) { return array('integer', $this->printName()); } return; }