Is the script provided valid?

@param  mixed  $value  Is the given script valid?

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

        return true;
    }
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;
    }
939348
protected function isValid($value)
    {
        if ($value === null) {
            $this->addError('This property is required.', 1221560910);
        }
        if ($value === '') {
            $this->addError('This property is required.', 1221560718);
        }
        if (is_array($value) && empty($value)) {
            $this->addError('This property is required', 1354192543);
        }
        if (is_object($value) && $value instanceof \Countable && $value->count() === 0) {
            $this->addError('This property is required.', 1354192552);
        }
    }
935893
public function isValid($value)
    {
        $valid = true;

        if (!empty($this->validation)) {
            if (!empty($this->label)) {
                $element = $this->label;
            } elseif (!empty($this->attributes["placeholder"])) {
                $element = $this->attributes["placeholder"];
            } else {
                $element = $this->attributes["name"];
            }

            if (substr($element, -1) == ":") {
                $element = substr($element, 0, -1);
            }

            foreach ($this->validation as $validation) {
                if (!$validation->isValid($value)) {
                    /*In the error message, %element% will be replaced by the element's label (or
                                        name if label is not provided).*/
                    $this->errors[] = str_replace("%element%", $element, $validation->getMessage());
                    $valid          = false;
                }
            }
        }

        return $valid;
    }
1296136
public function isValid($value)
    {
        $this->_setValue((string) $value);

        if (is_string($value)
            && (('' === $value) 
            || preg_match('/^\s+$/s', $value))
        ) {
            $this->_error();
            return false;
        } elseif (!is_string($value) && empty($value)) {
            $this->_error();
            return false;
        }

        return true;
    }
623239
public function isValid($value)
    {
        if (!$value instanceof WorkflowDispatchEventInterface) {
            $this->error(self::VALIDATE_VALUE_INVALID);
            return false;
        }

        if (null === $this->getAllowedHttpMethods()) {
            return true;
        }

        $request = $value->getMvcEvent()->getRequest();
        if (!$request instanceof Request) {
            $this->error(self::REQUEST_INVALID);
            return false;
        }

        /** @var Request  $request*/
        $method = $request->getMethod();
        $method = strtolower($method);

        $allowedHttpMethods = $this->getAllowedHttpMethods();
        if (!array_key_exists($method, $allowedHttpMethods)) {
            $this->error(self::HTTP_METHOD_INVALID);
            return false;
        }



        return true;
    }
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;
    }
920484
public function isValid($value)
    {
        $result = filter_var($value, FILTER_VALIDATE_EMAIL);
        if (!$result) {
            $this->addMessage('email');
        }
        return (boolean) $result;
    }
1319492
protected function isValueValid($value) {
		$this->checkValue($value);
		
		if ($this->validatable === null) {
			return true;
		}
		
		return $this->validatable->testEiFieldValue($this->eiu, $value);
	}
10375
protected function checkValidity($value) : bool
    {
        if (preg_match(static::$regex, $value)) {
            return true;
        } elseif ('' === $value) {
            return true;
        } else {
            return false;
        }
    }
291925
public function isValid($value)
    {
        if (!filter_var($value, $this->getFilter(), $this->getOption())) {
            $this->_error($this->getMessageKey(), $value);
            return false;
        }

        return true;
    }
728948
public function isValid($value)
    {
        if (!is_string($value)
            && !($value instanceof Uuid) // If instance of Uuid still does not means that is valid
        ) {
            $this->error(self::INVALID);
            return false;
        }

        $this->setValue($value);

        if (!preg_match('/^' . self::UUID_V4_PATTERN . '$/', $value)) {
            $this->error(self::NOT_UUID_V4);
            return false;
        }

        return true;
    }
403016
public function isValid(&$value)
    {
        // skip empty value
        if (is_string($value) && 0 === strlen($value)) {
            return false;
        }
        // found exact match
        if (in_array($value, $this->choices)) {
            return true;
        }
        // compare by ignoring case
        foreach ($this->choices as $choice) {
            if (!is_string($choice)) {
                continue;
            }
            if (strtoupper($value) == strtoupper($choice)) {
                $value = $choice;
                return true;
            }
        }
        // compare by match prefix
        foreach ($this->choices as $choice) {
            if (!is_string($choice)) {
                continue;
            }
            if (0 === strpos(strtoupper($choice), strtoupper($value))) {
                $value = $choice;
                return true;
            }
        }

        return false;
    }
1288265
public function isValid($value)
    {
        $ok = true;
        
        if (!preg_match('/^.*[0-9].*$/', $value) || 
            !preg_match('/^.*[a-zA-Z].*$/', $value)) {
            $this->error(self::SYNTAX);
            return false;
        }
        
        if (Text::strLen($value) < $this->options['min']) {
            $this->error(self::MIN);
            $ok = false;
        }
        
        if (Text::strLen($value) > $this->options['max']) {
            $this->error(self::MAX);
            $ok = false;
        }

        return $ok;
    }
822230
public static function validValue($value): bool
    {
        $enumerables = self::getCache();
        $values = array_values($enumerables);

        return \in_array($value, $values, true);
    }
899793
public function isValid($value)
    {
        if ($value !== null && !is_string($value) && !is_int($value) && !is_float($value) &&
            !is_bool($value) && !is_array($value) && !is_object($value)) {
            $this->_error(self::INVALID);
            return false;
        }

        $type    = $this->getType();
        $this->_setValue($value);
        $object  = false;

        // OBJECT_COUNT (countable object)
        if ($type >= self::OBJECT_COUNT) {
            $type -= self::OBJECT_COUNT;
            $object = true;

            if (is_object($value) && ($value instanceof Countable) && (count($value) == 0)) {
                $this->_error(self::IS_EMPTY);
                return false;
            }
        }

        // OBJECT_STRING (object's toString)
        if ($type >= self::OBJECT_STRING) {
            $type -= self::OBJECT_STRING;
            $object = true;

            if ((is_object($value) && (!method_exists($value, '__toString'))) ||
                (is_object($value) && (method_exists($value, '__toString')) && (((string) $value) == ""))) {
                $this->_error(self::IS_EMPTY);
                return false;
            }
        }

        // OBJECT (object)
        if ($type >= self::OBJECT) {
            $type -= self::OBJECT;
            // fall trough, objects are always not empty
        } else if ($object === false) {
            // object not allowed but object given -> return false
            if (is_object($value)) {
                $this->_error(self::IS_EMPTY);
                return false;
            }
        }

        // SPACE ('   ')
        if ($type >= self::SPACE) {
            $type -= self::SPACE;
            if (is_string($value) && (preg_match('/^\s+$/s', $value))) {
                $this->_error(self::IS_EMPTY);
                return false;
            }
        }

        // NULL (null)
        if ($type >= self::NULL) {
            $type -= self::NULL;
            if ($value === null) {
                $this->_error(self::IS_EMPTY);
                return false;
            }
        }

        // EMPTY_ARRAY (array())
        if ($type >= self::EMPTY_ARRAY) {
            $type -= self::EMPTY_ARRAY;
            if (is_array($value) && ($value == array())) {
                $this->_error(self::IS_EMPTY);
                return false;
            }
        }

        // ZERO ('0')
        if ($type >= self::ZERO) {
            $type -= self::ZERO;
            if (is_string($value) && ($value == '0')) {
                $this->_error(self::IS_EMPTY);
                return false;
            }
        }

        // STRING ('')
        if ($type >= self::STRING) {
            $type -= self::STRING;
            if (is_string($value) && ($value == '')) {
                $this->_error(self::IS_EMPTY);
                return false;
            }
        }

        // FLOAT (0.0)
        if ($type >= self::FLOAT) {
            $type -= self::FLOAT;
            if (is_float($value) && ($value == 0.0)) {
                $this->_error(self::IS_EMPTY);
                return false;
            }
        }

        // INTEGER (0)
        if ($type >= self::INTEGER) {
            $type -= self::INTEGER;
            if (is_int($value) && ($value == 0)) {
                $this->_error(self::IS_EMPTY);
                return false;
            }
        }

        // BOOLEAN (false)
        if ($type >= self::BOOLEAN) {
            $type -= self::BOOLEAN;
            if (is_bool($value) && ($value == false)) {
                $this->_error(self::IS_EMPTY);
                return false;
            }
        }

        return true;
    }
1275350
public function isValueValid($value) {
		return $value instanceof Type\GeoShape || $value instanceof Type\Place || $value instanceof DataType\TextType;
	}