Prado\Web\UI\WebControls\TRangeValidator::isValidStringLength PHP Метод

isValidStringLength() защищенный Метод

protected isValidStringLength ( $value ) : boolean
Результат boolean true if min and max string length are satisfied.
    protected function isValidStringLength($value)
    {
        $minValue = $this->getMinValue();
        $maxValue = $this->getMaxValue();
        $valid = true;
        $charset = $this->getCharset();
        if ($charset === '') {
            $app = $this->getApplication()->getGlobalization();
            $charset = $app ? $app->getCharset() : null;
            if (!$charset) {
                $charset = 'UTF-8';
            }
        }
        $length = iconv_strlen($value, $charset);
        if ($minValue !== '') {
            $valid = $valid && $this->isGreaterThan($length, intval($minValue));
        }
        if ($maxValue !== '') {
            $valid = $valid && $this->isLessThan($length, intval($maxValue));
        }
        return $valid;
    }