Checks if the given flag constant is valid.

@param integer $value Flag constant value
15467
protected function _checkFlags( $value )
	{
		$value = (int) $value;

		if( $value < MShop_Order_Item_Base_Product_Abstract::FLAG_NONE ||
			$value > MShop_Order_Item_Base_Product_Abstract::FLAG_IMMUTABLE ) {
				throw new MShop_Order_Exception( sprintf( 'Flags "%1$s" not within allowed range', $value ) );
		}
	}
711071
public function validate($value)
    {
        if (!is_numeric($value)) {
            return false;
        }

        return $value / $this->number == round($value / $this->number);
    }
872394
public function isValid($value)
    {
        $valueString = (string) $value;

        $this->_setValue($valueString);

        $locale = localeconv();

        $valueFiltered = str_replace($locale['thousands_sep'], '', $valueString);
        $valueFiltered = str_replace($locale['decimal_point'], '.', $valueFiltered);

        if (strval(floatval($valueFiltered)) != $valueFiltered) {
            $this->_error();
            return false;
        }

        return true;
    }
298000
public function isValid($value)
    {
        $value = (string) $value;
        if (strlen($value) !== 10) {
            $this->_error(self::INVALID_NIP, $value);
            return false;
        }

        $intSum = 0;

        for ($i = 0; $i < 9; $i++) {
            $intSum += $this->_weights[$i] * $value[$i];
        }

        $int = $intSum % 11;
        $intControlNr = ($int === 10) ? 0 : $int;

        if ($intControlNr !== (int) $value[9]) {
            $this->_error(self::INVALID_NIP, $value);
            return false;
        }

        return true;
    }
132956
public function validateValue( $value ) : bool
   {

      if ( false === $this->hasValidator() )
      {
         return true;
      }

      return (bool) ( $this->_validator )( $value );

   }
815840
public function isValid($value)
    {
        if (('js-' . self::generateCrc() . '-js') == $value) {
            return true;
        }
        return $this->_error(self::INVALID);
    }
360606
protected function isValidValue($value)
    {
        $valid = true;
        if (is_array($value)) {
            $numericKeys = 0;
            foreach ($value as $k => $v) {
                $numericKeys += is_integer($k);
                if (!$this->isValidValue($v)) {
                    $valid = false;
                    break;
                }
            }
            if (!($numericKeys == 0 || $numericKeys == count($value))) {
                $valid = false;
            }
        } else {
            if (null !== $value && !is_scalar($value)) {
                $valid = false;
            }
        }
        return $valid;
    }
1170195
public function isValid($value)
    {
        if (!preg_match('/^\+?[0-9]{2,12}$/', $value)) {
            $this->error(self::BAD_SYNTAX);
            return false;
        }
        
        return true;
    }
733799
protected function _validate($value)
    {
        $value = trim($value);
        return (is_string($value) && ($value === filter_var($value, FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES)));
    }
1124827
protected function checkType($value)
    {
        if (is_int($value) !== true && is_string($value) !== true) {
            $msg = "The IntOrIdentifier Datatype only accepts to store identifier and integer values.";
            throw new InvalidArgumentException($msg);
        }
    }
782286
public function isValid($value)
    {
        $this->_setValue($value);
        $token = $this->getToken();

        if (empty($token)) {
            $this->_error(self::MISSING_TOKEN);
            return false;
        }

        if ($value !== $token) {
            $this->_error(self::NOT_SAME);
            return false;
        }

        return true;
    }
204622
public function isValid($value)
    {
        $this->databaseError = null;

        // Empty connection string is valid (defaults to localhost:defaultPort)
        if (!empty($value) && !preg_match($this->pattern, $value)) {
            $this->error(self::INVALID);

            return false;
        }

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

        $this->_setValue($valueString);

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

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

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

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

        return true;
    }
1164582
private function isPrimitive($value): bool {
		return (is_string($value)
			|| is_int($value)
			|| is_float($value)
			|| is_bool($value)
			|| is_null($value)
			|| ($value instanceof PhpConstant));
	}
1135346
public static function isInteger($value)
    {
        if (is_int($value)) {
            return true;
        } elseif (!is_string($value)) {
            return false;
        }

        return preg_match('/^\d+$/', $value) > 0;
    }
558123
public function checkValue(&$value)
    {
        if (parent::checkValue($value) === true) {
            if (!preg_match('/^(?:from|to|(?:\d{1,2}|100)%)$/D', $value)) {
                $this->setIsValid(false);
                $this->addValidationError("Invalid value '$value' for the keyframe selector.");

                return false;
            }
            return true;
        }

        return false;
    }
832448
public function isValid($value)
    {
        if (!preg_match('/^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$/', $value)) {
            return $this->_error(self::INVALID);
        }
        foreach (explode('.', $value) as $num) {
            if ($num > 255 || $num < 0) {
                return false;
            }
        }
        return true;
    }