@param $value

@return bool
505458
public function isValid($value) : bool
    {
        if ($value === null && $this->nullable) {
            return true;
        }

        return $value instanceof Metadata;
    }
461181
public function check($value) : bool
    {
        try {
            if (false == \DateTime::createFromFormat($this->rule, $value)) {
                return false;
            }
            return true;
        } catch (\Exception $e) {
            return false;
        }
    }
1040353
public function isValid($value)
    {
        if (!is_string($value)) {
            $this->_error(self::INVALID);
            return false;
        }

        $this->_setValue($value);
        $result = @preg_match(self::LASTMOD_REGEX, $value);
        if ($result != 1) {
            $this->_error(self::NOT_VALID);
            return false;
        }

        return true;
    }
505780
private function check($value) {

		$values = ['yes', 'on', '1', 'true'];
		
		if(true === is_string($value)) {
			return true === in_array($value, $values);
		}

		return false;
	}
975544
public static function has($value)
    {
        if ($value instanceof static && get_class($value) === get_called_class()) {
            return true;
        }
        $class = get_called_class();
        $constants = static::detectConstants($class);
        return in_array($value, $constants, true);
    }
984889
public function isValid($value)
    {
        $this->setValue($value);

        $check = $this->pageRepo->findOneBy(
            [
                'pageId' => $value,
                'pageType' => $this->pageType,
                'site' => $this->site
            ]
        );

        if (empty($check)) {
            $this->error(self::PAGE_TEMPLATE);

            return false;
        }

        return true;
    }
920505
protected function _value($value)
    {
        if ($value === null) {
            return 'null';
        }
        if ($value === true) {
            return 'true';
        }
        if ($value === false) {
            return 'false';
        }

        return (string)$value;
    }
836559
private function check($value) {

		if(true === is_string($value)) {
			
			@json_decode($value);

	 		return true === (json_last_error() == JSON_ERROR_NONE);
	 	}

	 	return false;
	}
929994
public function isValid($value)
    {
        if ('mixed' === $this->type) {
            return true;
        }

        static $functionMap = array(
            'array'    => 'is_array',
            'bool'     => 'is_bool',
            'boolean'  => 'is_bool',
            'double'   => 'is_float',
            'float'    => 'is_float',
            'int'      => 'is_int',
            'integer'  => 'is_int',
            'null'     => 'is_null',
            'numeric'  => 'is_numeric',
            'object'   => 'is_object',
            'resource' => 'is_resource',
            'scalar'   => 'is_scalar',
            'string'   => 'is_string',
        );

        if (array_key_exists($this->type, $functionMap)) {
            $function = $functionMap[$this->type];

            return $function($value);
        }

        if (is_object($value)) {
            return ($value instanceof $this->type);
        }

        return false;
    }
132530
public function isValid($value)
    {
        if (!is_null($value) && !is_string($value) && !is_int($value) && !is_float($value) &&
            !is_bool($value) && !is_array($value)) {
            $this->_error(self::INVALID);
            return false;
        }
        if (is_string($value) && (('' === $value) || preg_match('/^\s+$/s', $value))) {
            $this->_error(self::INVALID);
            return false;
        } elseif (is_int($value) && (0 === $value)) {
            return true;
        } elseif (!is_string($value) && empty($value)) {
            $this->_error(self::INVALID);
            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;
    }
1362514
protected function hasValue($value)
    {
        $value = (int) $value;

        return isset(static::$names[$value]) || array_key_exists($value, static::$names);
    }
121216
public static function isValid($value)
    {
        if (!is_string($value)) {
            return false;
        }

        $type = self::getType($value);

        return !($type === null);
    }
1059229
public function post($value)
    {
        if (!isset($this->post[$value])) {
            return false;
        } else {
            return $this->post[$value];
        }
    }
31424
public function isValid($value)
    {
        $this->_setValue($value);

        if (!is_string($value)) {
            return false;
        }

        return Zend_Uri::check($value);
    }
162153
public function isValid($value)
    {
        if (! is_array($value)
            || !isset($value['mode'])
            || (!isset($value['content']) && !isset($value['attributes']))
        ){
            return false;
        }

        return true;
    }
1374413
public function isValid($value)
    {
        if (!is_array($value)) {
            return false;
        }

        foreach ($value as $subValue) {
            if (!$this->valueTypeNode->isValid($subValue)) {
                return false;
            }
        }

        return true;
    }