/** * {@inheritDoc} */ public function isRequiredZeroPositiveFloat($value, $suppressException = true) { /* Clear the last error. */ $this->lastError = null; /* If valid just return true. */ if (Validator::isRequiredZeroPositiveFloat($value)) { return true; } /* Set the error message. */ $type = gettype($value); $this->lastError = sprintf('Expected zero or positive float, \'%s\' given.', 'double' === $type ? 'negative float' : $type); return $this->validationFailed($suppressException); }