/** * {@inheritDoc} */ public function validate($value) { if (!is_numeric($value)) { return false; } $value += 0; if ($this->rule->getAllowFloat()) { return is_float($value); } else { return is_int($value); } }
/** * {@inheritDoc} */ public function validate($value) { if (!is_numeric($value)) { return false; } $value += 0; if ($this->rule->getAllowFloat()) { return is_float($value); } else { return is_int($value); } }