Prado\Web\UI\WebControls\TRangeValidator::evaluateIsValid PHP Method

evaluateIsValid() protected method

The validation succeeds if the input data is within the range. The validation always succeeds if the input data is empty.
protected evaluateIsValid ( ) : boolean
return boolean whether the validation succeeds
    protected function evaluateIsValid()
    {
        $value = $this->getValidationValue($this->getValidationTarget());
        if ($value === '') {
            return true;
        }
        switch ($this->getDataType()) {
            case TRangeValidationDataType::Integer:
                return $this->isValidInteger($value);
            case TRangeValidationDataType::Float:
                return $this->isValidFloat($value);
            case TRangeValidationDataType::Date:
                return $this->isValidDate($value);
            case TRangeValidationDataType::StringLength:
                return $this->isValidStringLength($value);
            default:
                return $this->isValidString($value);
        }
    }