Returns true if and only if $value passes all validations in the chain

Validators are run in the order in which they were added to the chain (FIFO).

@param  mixed $value
@return bool
426459
public function isValid($value)
    {
        if (is_null($value)) {
            $result = false;
            $this->error(self::NOT_NULL);
        }
        else
            $result = true;
        return $result;
   }
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;
    }
153355
public function isValid($value)
    {
        $result = (boolean) filter_var($value, FILTER_VALIDATE_URL);
        if (!$result) {
            $this->addMessage('url');
        }
        return $result;
    }
471457
public function isValid($value)
    {
        $filePath = GeneralUtility::getFileAbsFileName($value);

        if (false === GeneralUtility::getUrl($filePath)) {
            $errorMessage = $this->translateErrorMessage('validator.file_exists.not_valid', 'configuration_object', [$value]);
            $this->addError($errorMessage, 1510085560);
        }
    }
382377
public function hasAllowedType($value)
    {
        if (!$this->forceType) {
            return true;
        }

        return Type::is($value, $this->forceType);
    }
634802
public function isValid($value)
    {
        $this->_setValue($value);
        $arr = str_split($value);

        if (preg_match('/[0-9]/', $value) !== 1) {
            $this->_error(self::PASSWORD_NO_NUMBER);
            return false;
        }

        if (count(array_diff($this->_loweCaseLetters, $arr)) === self::LETTERS_COUNT) {
            $this->_error(self::PASSWORD_NO_LOWER_CASE_LETTER);
            return false;
        }

        if (count(array_diff($this->_upperCaseLetters, $arr)) === self::LETTERS_COUNT) {
            $this->_error(self::PASSWORD_NO_UPPER_CASE_LETTER);
            return false;
        }

        return true;
    }
199995
public function containsValue($value): bool {
        foreach ($this->array as $key => $val) {
            if (null === $val) {
                continue;
            }
            if (Comparator::equals($val, $value)) {
                return true;
            }
        }
        return false;
    }
20927
public function isValid($value) {
		if ($this->haystack === null) {
			throw new ValidationFailure('Reference array wasn\'t been suplied');
		}
		
		if (in_array($value, $this->haystack, $this->strict)) {
			return true;
		}
		
		$this->addMessage('Value does not exists in the list');
		
		return false;
	}
851213
public function isValid($value)
    {
        $result = preg_match('/(.+)/i', $value);
        if (!$result) {
            $this->addMessage('notEmpty');
        }
        return (boolean) $result;
    }
505905
public function isValueValid($value) {
		return $value instanceof Type\DataFeedItemType || $value instanceof DataType\TextType || $value instanceof Type\ThingType;
	}
1221721
public function isValid($value)
    {
        if ($this->skipValidation)
            return true;

        $datatype = $this->validation['datatype'];

        //NULL check, empty strings are considered null
        if(in_array($datatype, array('string', 'url', 'email', 'slug', 'slugwithslash', 'html', 'binary','json'))
          && strlen(trim($value)) == 0)
            $value = null;

        if ($this->validation['nullable'] === false && $value === null && $datatype != 'boolean') {
            $this->failureCode = 'nullable';
            $this->failureMessage = 'cannot be empty';
            return false;
        }

        //Nothing more to validate if the value is null...
        if ($value === null)
            return true;


        //Check date makes sense
        if ($datatype === 'date') {

            //todo: not sure how to check validity of date... it's already a DateTime instance.
            if (false) {
                $this->failureCode = 'invalid';
                $this->failureMessage = 'is an invalid date';
                return false;
            }
        }


        //Validate MIN
        $min = $this->validation['min'];

        if ($min != null) {
            if ($datatype === 'float') {
                if($value < floatval($min)) {
                    $this->failureCode = 'min';
                    $this->failureMessage = 'is less than the minimum value';
                    return false;
                }
            } else if ($datatype === 'int') {
                if($value < intval($min)) {
                    $this->failureCode = 'min';
                    $this->failureMessage = 'is less than the minimum value';
                    return false;
                }
            } else {

                if (is_string($value) && strlen($value) < intval($min)) {
                    $this->failureCode = 'minlength';
                    $this->failureMessage = 'must be at least '.($min).' characters';
                    return false;
                }
            }
        }


        //Validate MAX
        $max = $this->validation['max'];

        if ($max != null) {
            if ($datatype === 'float') {
                if($value > floatval($max)) {
                    $this->failureCode = 'max';
                    $this->failureMessage = 'is more than the maximum value';
                    return false;
                }
            } else if ($datatype === 'int') {
                if($value > intval($max)) {
                    $this->failureCode = 'max';
                    $this->failureMessage = 'is more than the maximum value';
                    return false;
                }
            } else {

                $maxbytes = intval($max);

                if(intval($max) < 255)
                {
                    // count characters

                    if (is_string($value) && StringUtils::charCount($value) > intval($max)) {
                        $this->failureCode = 'maxlength';
                        $this->failureMessage = 'must be a maximum of '.($max).' characters';
                        return false;
                    }

                    $maxbytes = 255;

                }

                // count bytes
                if (is_string($value) && StringUtils::byteCount($value) > intval($maxbytes)) {
                    $this->failureCode = 'maxlength';
                    $this->failureMessage = 'must be a maximum of '.($maxbytes).' bytes';
                    return false;
                }
            }
        }

        if($datatype === 'slug')
        {
            if(!SlugUtils::isSlug($value, false))
            {
                $this->failureCode = 'invalid';
                $this->failureMessage = 'is not a valid slug, cannot contain slashes';
                return false;
            }
        }

        if($datatype === 'slugwithslash')
        {
            if(!SlugUtils::isSlug($value, true))
            {
                $this->failureCode = 'invalid';
                $this->failureMessage = 'is not a valid slug';
                return false;
            }
        }

        if($datatype === 'url')
        {
            if(!URLUtils::isUrl($value))
            {
                $this->failureCode = 'invalid';
                $this->failureMessage = 'is not a valid URL';
                return false;
            }
        }

        if($datatype === 'email')
        {
            if(!EmailUtils::isEmailAddress($value))
            {
                $this->failureCode = 'invalid';
                $this->failureMessage = 'is not a valid email address';
                return false;
            }
        }

        if($datatype === 'json')
        {
            if(!JSONUtils::isValid($value)) //todo: get exact error message here
            {
                $this->failureCode = 'invalid';
                $this->failureMessage = 'is not a valid json string';
                return false;
            }
        }

        //Validate MATCH expression
        $match = $this->validation['match'];

        if ($match != null) {
            // Automatically escape unescaped slashes in the match before running it
            $match = preg_replace('/([^\\\\])\//', '$1\\/', $match);

            if (preg_match('/'.$match.'/s', $value) === 0) {
                $this->failureCode = 'invalid';
                //$this->failureMessage = 'is invalid (' . substr($value, 0, 255) . ')';
                $this->failureMessage = 'is invalid';
                return false;
            }
        }

        // Validate all custom functions
        foreach ( $this->validation['callback'] as $callback ) {
            if (!empty($callback) && call_user_func($callback, $value) === false) {
                $this->failureCode = $callback;
                $this->failureMessage = 'is invalid';
                return false;
            }
        }

        return true;
    }
636718
public function isValid($value) {
		if ($this->_callback === null) {
			throw new ValidationFailure('Callback wasn\'t been suplied');
		}
		
		if ($this->_callback->__invoke($value)) {
			return true;
		}
		
		$this->addMessage($this->_failMessage);
		
		return false;
	}
527192
public function isValid($value)
    {
        $this->databaseError = null;

        // @codeCoverageIgnoreStart
        // This cannot be testes until we have a test database environment.
        try {
            $connection = new Client($value);
            $connection->listDatabases();
        } catch (ConnectionTimeoutException $e) {
            $this->databaseError = $e->getMessage();
            $this->error(self::NO_CONNECTION);
            return false;
        } catch (\Exception $e) {
            $this->databaseError = $e->getMessage();
            $this->error(self::NO_CONNECTION);
            return false;
        }

        return true;
        // @codeCoverageIgnoreEnd
    }
497094
public function validate($value)
    {
        if (!is_array($value)) {
            return false;
        }

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

        return $this->checkIfAllUniques($value);
    }
1319492
protected function isValueValid($value) {
		$this->checkValue($value);
		
		if ($this->validatable === null) {
			return true;
		}
		
		return $this->validatable->testEiFieldValue($this->eiu, $value);
	}
1060467
public function isValueValid($value) {
		return $value instanceof Type\ListItemType || $value instanceof DataType\TextType || $value instanceof Type\ThingType;
	}
408918
public function validate($value = "")
    {
        if (is_null($value) && $this->isEmptyAllowed()) {
            return true;
        }

        if ($this->isNullNotAllowed() && is_null($value)) {
            return false;
        }

        return true;
    }