Test Value against Condition

@param Value $value
@return bool
@throws ProcessingException
337474
public function checkCondition(Value $value)
    {
        if ($this->compareType($value) === false) {
            return false;
        }

        if (!in_array($value->getType(), [Value::VALUE_INT, Value::VALUE_FLOAT])) {
            throw new ProcessingException('This condition can be performed only over int and float types.');
        }

        if ($value->getValue() < $this->getValue()->getValue()) {
            return true;
        }

        return false;
    }
655628
protected function checkValidity($value) : bool
    {
        if ('' === $value) {
            return true;
        }
        $date = date_create($value);
        if (false === $date) {
            return false;
        }
        return true;
    }
687935
protected function processSetValue($value)
    {
        if ($this->onSetCallback !== null && ($this->onSetValue === null || $this->onSetValue === $value)) {
            return $this->processCallback($this->onSetCallback, $value);
        }

        return $value;
    }
1338425
public static function matches(?string $value): bool
    {
        return $value !== null && 1 === preg_match(self::FORMATTER_PATTERN, $value);
    }
845351
public function isValid($value)
    {
        if (!$value instanceof WorkflowDispatchEventInterface) {
            $this->error(self::VALIDATE_VALUE_INVALID);
            return false;
        }

        $name = array_key_exists('paramNameInPrepareData', $this->options) ? $this->options['paramNameInPrepareData'] : null;
        if (!is_string($name)) {
            $this->error(self::PARAM_NAME_IN_PREPARE_DATA_INVALID);
            return false;
        }
        $prepareData =  $value->getPrepareData();

        if (!array_key_exists($name, $prepareData)) {
            $this->error(self::PARAM_NOT_FOUND_IN_PREPARE_DATA);
            return false;
        }

        $actualValue = $prepareData[$name];

        $typeExpectedValue = array_key_exists('typeExpectedValue', $this->options) ? $this->options['typeExpectedValue'] : 'string';

        $rawExpectedValue = array_key_exists('expectedValue', $this->options) ? $this->options['expectedValue'] : null;

        try {
            $expectedValue = $this->getExpectedValue($rawExpectedValue, $typeExpectedValue);
        } catch (Exception\InvalidConvertTypeException $e) {
            $this->error(self::ERROR_CONVERT_EXPECTED_VALUE);
            return false;
        }

        return $expectedValue === $actualValue;
    }
806341
public function validateValueFixedPriceRule($value)
    {
        $field = 'value';
        $label = $this->translation->text('Value');

        if (!is_numeric($value)) {
            $this->setErrorNumeric($field, $label);
            return false;
        }

        if (strlen($value) > 8) {
            $this->setErrorInvalid($field, $label);
            return false;
        }

        return true;
    }
687792
public function checkValue(&$value)
    {
        if (parent::checkValue($value) === true) {
            $value = trim($value);
            if (in_array($value,
                [
                    self::SELECTOR_ALL, self::SELECTOR_FIRST, self::SELECTOR_LEFT,
                    self::SELECTOR_RIGHT, self::SELECTOR_BLANK
                ])) {
                return true;
            } else {
                throw new \InvalidArgumentException("Invalid value '" . $value . "' for argument 'value'.");
            }
        }

        return false;
    }
345274
protected function process($value, string $type)
    {
        if ($type === 'integer') {
            return (int) $value;
        }

        if ($type === 'float') {
            return (float) $value;
        }

        if ($type === 'boolean') {
            return (bool) $value;
        }

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

        $this->_setValue($value);
        if (!ctype_xdigit((string) $value)) {
            $this->_error(self::NOT_HEX);
            return false;
        }

        return true;
    }
1043305
private function checkValue($value){


        $check = $this->getPossibleValueArray();
        if (!is_array($check) || empty($check)){
            $this->handleError("No Check Array defined (getPossibleValueArray())",  EnumException::NoEnumsDefined);
        }
        if (!in_array($value, $check)){
            $this->handleError("Invalid Value", EnumException::Invalidvalue);
        }
    }
1362174
public function checkValue(&$value)
    {
        if (is_string($value)) {
            $value = Placeholder::replaceStringsAndComments($value);
            $value = Placeholder::removeCommentPlaceholders($value, true);
            $value = Placeholder::replaceStringPlaceholders($value, true);
            $value = trim($value);

            if ($value !== '') {
                return true;
            } else {
                $this->setIsValid(false);
            }
        } else {
            throw new \InvalidArgumentException(
                "Invalid type '" . gettype($value). "' for argument 'value' given."
            );
        }
    }
464012
public function isValid($value)
    {
        if (!is_string($value) && !is_int($value) && !is_float($value)) {
            $this->_error(self::INVALID);
            return false;
        }

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

        $this->_setValue($value);
        if ($this->_locale === null) {
            $locale        = localeconv();
            $valueFiltered = str_replace($locale['decimal_point'], '.', $value);
            $valueFiltered = str_replace($locale['thousands_sep'], '', $valueFiltered);

            if (strval(intval($valueFiltered)) != $valueFiltered) {
                $this->_error(self::NOT_INT);
                return false;
            }

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

        return true;
    }
665114
public function contains(string $value): bool
    {
        try {
            $this->position($value);

            return true;
        } catch (SubstringException $e) {
            return false;
        }
    }
914949
protected function isValid($value)
    {
        $parser = new EelParser($value);
        $result = $parser->match_Expression();

        if ($result === false) {
            $this->addError('Expression "%s" could not be parsed.', 1421940748, [$value]);
        } elseif ($parser->pos !== strlen($value)) {
            $this->addError('Expression "%s" could not be parsed. Error starting at character %d: "%s".', 1421940760, [$value, $parser->pos, substr($value, $parser->pos)]);
        }
    }
442603
public function processValue($value)
	{
		// remove html tags as we cannot access renderDataCellContent from the column
		$clean = strip_tags($value);
		$this->total += ((float)$this->extractNumber($clean));
	}
750612
function Check($value)
    {
        $this->SetValue($value);
        $required = $this->GetRequiredValidator();
        if ($required && !$required->Check($value))
        {
            $this->checkFailed = true;
            return false;
        }
        return parent::Check($value);
    }
66257
public function hasValue($value)
    {
        $index = array_search($value, $this->values);

        if ($index === false) {
            return false;
        }

        return true;
    }