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

isValidFloat() protected method

Determine if the value is within the specified float range.
protected isValidFloat ( $value ) : boolean
return boolean true if within range.
    protected function isValidFloat($value)
    {
        $minValue = $this->getMinValue();
        $maxValue = $this->getMaxValue();
        $valid = preg_match('/^[-+]?([0-9]*\\.)?[0-9]+([eE][-+]?[0-9]+)?$/', trim($value));
        $value = floatval($value);
        if ($minValue !== '') {
            $valid = $valid && $this->isGreaterThan($value, floatval($minValue));
        }
        if ($maxValue !== '') {
            $valid = $valid && $this->isLessThan($value, floatval($maxValue));
        }
        return $valid;
    }