Defined by Zend_Validate_Interface

Returns true if and only if $value is less than max option

@param  mixed $value
@return boolean
333365
public function isValid($value)
    {
        $this->_setValue($value);

        if (!$value || !is_string($value) && !is_int($value) && !is_float($value)) {
            $this->_error(self::INVALID_PRICE);
            return false;
        }

        if (false === $this->_options['negative'] && '-' === $value[0]) {
            $this->_error(self::PRICE_NEGATIVE, $value);
            return false;
        }

        $status = @preg_match($this->_pattern, $value);
        if (false === $status) {
            $this->_error(self::INVALID_PRICE);
            return false;
        }

        if (!$status) {
            $this->_error(self::INVALID_PRICE);
            return false;
        }

        return true;
    }
291682
function validate($value, $options = null)
    {
        $length = core_text::strlen($value);
        switch ($this->name) {
            case 'minlength': return ($length >= $options);
            case 'maxlength': return ($length <= $options);
            default:          return ($length >= $options[0] && $length <= $options[1]);
        }
    }
535979
public function isValid($value = null, array $options = []): bool
    {
        $this->setOptions($options);
        $this->setValue($value);
        $this->errors = [];

        $isValid = $this->validatePesel();

        return $isValid;
    }
1124362
public function isValid($value)
    {
        if (!is_string($value) && !is_int($value) && !is_float($value)) {
            $this->_error(self::INVALID);
            return false;
        }

        $this->_setValue($value);

        if ('' === $value) {
            $this->_error(self::STRING_EMPTY);
            return false;
        }

        if (null === self::$_filter) {
            /**
             * @see Zend_Filter_Alnum
             */
            // require_once 'Zend/Filter/Alnum.php';
            self::$_filter = new Zend_Filter_Alnum();
        }

        self::$_filter->allowWhiteSpace = $this->allowWhiteSpace;

        if ($value != self::$_filter->filter($value)) {
            $this->_error(self::NOT_ALNUM);
            return false;
        }

        return true;
    }
291925
public function isValid($value)
    {
        if (!filter_var($value, $this->getFilter(), $this->getOption())) {
            $this->_error($this->getMessageKey(), $value);
            return false;
        }

        return true;
    }
855475
public function validateMaxLength($value)
  {
    if (!isset($this->attr["maxlength"])) return true;

		$maxlength = trim($this->attr["maxlength"]);
    $length = strlen($value);

    if ($length > $maxlength) {
      $this->errors[] =  "\"{$this->label}\" contains {$length} characters, but it is limited to {$maxlength} characters. Please shorten the length.";
			return false;
		}

		return true;
  }
1289675
public function clamp($value)
	{
		return isset($value) && is_numeric($value) ? min(max($value, $this->min), $this->max) : $this->default ?: ($this->nullable ? null : min(max(0, $this->min), $this->max));
	}
769914
public function isValid($value = null, array $options = []): bool
    {
        if (\count($options) > 0) {
            $this->setOptions($options);
        }
        $this->setValue($value);
        $this->errors = [];

        switch ($this->options['type']) {
            case 'equals':
                $isValid = $this->validateEquals();
                break;
            case 'lower-than':
                $isValid = $this->validateLowerThan();
                break;
            case 'greater-than':
                $isValid = $this->validateGreaterThan();
                break;
            default:
                $isValid = $this->validateEquals();
                break;
        }

        return $isValid;
    }
396859
private function validateLowerThan(): bool
    {
        if ($this->options['max'] !== null) {
            if ($this->options['inclusive'] === false && $this->value >= $this->options['max']) {
                $this->setError(self::VALIDATOR_ERROR_NUMBER_MUST_BE_LOWER_THAN_MAX);
                return false;
            }

            if ($this->value > $this->options['max']) {
                $this->setError(self::VALIDATOR_ERROR_NUMBER_MUST_BE_LOWER_OR_EQUAL_TO_MAX);
                return false;
            }
        }
        return true;
    }
604478
public function isValueValid($value) {
		return $value instanceof DataType\NumberType || $value instanceof Type\PriceSpecificationType || $value instanceof DataType\TextType;
	}
110551
protected function validate($value)
    {
        return Match::on(Option::create($this->validator->isValid($value), false))
            ->Monad_Option_Some(true)
            ->Monad_Option_None(
                function () {
                    $msgs = $this->validator->getMessages();
                    array_walk(
                        $msgs, 
                        function ($msg) {
                            $this->messenger->add(new StringType($msg));
                        }
                    );
                    return false;
                }
            )
            ->value();
    }
587879
protected function validatorValue($value)
    {
        if (!$value) {
            return $this->allowEmpty;
        }

        $pattern = str_replace('{schemes}', '(' . implode('|', $this->validSchemes) . ')', $this->pattern);
        if (preg_match($pattern, $value)) {
            return true;
        }

        return false;
    }
206571
public function isValid($value)
    {
        if (!is_string($value) && !is_int($value) && !is_float($value)) {
            $this->_error(self::INVALID);
            return false;
        }

        if (is_float($value)) {
            return true;
        }

        $this->_setValue($value);
        try {
            if (!Zend_Locale_Format::isFloat($value, array('locale' => $this->_locale))) {
                $this->_error(self::NOT_FLOAT);
                return false;
            }
        } catch (Zend_Locale_Exception $e) {
            $this->_error(self::NOT_FLOAT);
            return false;
        }

        return true;
    }
1318990
public function validate($value)
    {
        if ($this->isa) {
            $test = ValueType::test($value, $this->isa, $this->isaOption);
            if ($test === false) {
                return false;
            }

            if ($test === true) {
                $value = ValueType::parse();
            }
        }

        if (
            ($validValues = $this->getValidValues()) &&
            !\in_array($value, $validValues, true)
        ) {
            return false;
        }

        if (
            $this->validator &&
            !($this->validator)($value)
        ) {
            return false;
        }

        $this->value = $value;

        return true;
    }
522783
public function isValid($value)
    {
        $valueString = (string) $value;

        $this->_setValue($valueString);

        if (($this->_format !== null) or ($this->_locale !== null)) {
            include_once 'Zend/Date.php';
            if (!Zend_Date::isDate($value, $this->_format, $this->_locale)) {
                if ($this->_checkFormat($value) === false) {
                    $this->_error(self::FALSEFORMAT);
                } else {
                    $this->_error(self::INVALID);
                }
                return false;
            }
        } else {
            if (!preg_match('/^\d{4}-\d{2}-\d{2}$/', $valueString)) {
                $this->_error(self::NOT_YYYY_MM_DD);
                return false;
            }

            list($year, $month, $day) = sscanf($valueString, '%d-%d-%d');

            if (!checkdate($month, $day, $year)) {
                $this->_error(self::INVALID);
                return false;
            }
        }

        return true;
    }
261712
protected function validateValue($value)
    {
        // strip empty lines
        $lines = array_filter(
            explode("\n", $value)
        );

        // strip comments (lines beginning with "#")
        $lines = array_filter($lines, function ($line) {
            $line = trim($line);

            return !empty($line) && $line[0] !== '#';
        });

        // validate each line
        foreach ($lines as $line) {
            if (!$this->validateLine($line)) {
                return false;
            }
        }

        return true;
    }
967999
public function isValid($value)
    {
        if (!is_string($value) && !is_int($value) && !is_float($value)) {
            $this->_error(self::INVALID);
            return false;
        }

        $this->_setValue((string) $value);

        if ('' === $this->_value) {
            $this->_error(self::STRING_EMPTY);
            return false;
        }

        if (null === self::$_filter) {

            self::$_filter = new Zend_Filter_Digits();
        }

        if ($this->_value !== self::$_filter->filter($this->_value)) {
            $this->_error(self::NOT_DIGITS);
            return false;
        }

        return true;
    }