Validates a value against all given Validators

@param mixed $value
@return ValidationResultSet
492192
public function validateValue($value) {
        $validationResultSet = new ValidationResultSet();
        foreach($this->validators as $validator) {
            $validationResultSet->add($validator->validate($value));
        }
        return $validationResultSet;
    }
666501
private function validate(string $name, $value): bool
    {
        if (! isset($this->validators[$name])) {
            return true;
        }

        $errors = [];

        $isValid = true;
        foreach ($this->validators[$name] as $validator) {
            if (! $validator->is_valid($value)) {
                $errors = array_merge($errors, $validator->get_error_messages());
                $isValid = false;
            }
        }

        $element = $this->element($name);
        if ($element instanceof ErrorAwareInterface) {
            $element->withErrors($errors);
        }

        return $isValid;
    }
1121774
protected function validateValue($value, EiFieldValidationResult $validationResult) {
		$this->checkValue($value);
		
		if ($this->validatable === null) {
			return;
		}
		
		return $this->validatable->validateEiFieldValue($this->eiu, $value, $validationResult);
	}
1022110
protected function validate($value)
    {
        $v1 = $this->validator1;
        $v2 = $this->validator2;

        return $v1($value, $this->messenger) xor $v2($value, $this->messenger);
    }
232993
protected function validateWithValidatorRule($value, $rule = 'required')
    {
        return $this->laravelValidatorFactory()->make(['value' => $value], ['value' => $rule])->fails() === false;
    }
1035978
public function with($value): ValidableInterface
    {
        parent::with($value);
        
        if (false === ($value instanceof EntityInterface)) {
            throw new ValidatorException(sprintf('Validator accept only (%s) objects', EntityInterface::class));
        }
        
        return $this;
    }
7309
private function getClassValidator($value)
    {
        $classModel = get_class($value);
        $className = substr(strrchr($classModel, '\\'), 1);
        $fullClass = 'Greenter\\Validator\\Loader\\'.$className.'Loader';

        if (!class_exists($fullClass)) {
            return false;
        }

        return $fullClass;
    }
1055481
public function validate($value) {
        // Sadly php bug #67167 makes the following lines necessary
        if(is_null($value)) {
            return new ValidationResult(false, 'Not a valid boolean but NULL', self::ERR_NULL);
        }
        if(is_object($value)) {
            return new ValidationResult(false, 'Not a valid boolean but an object', self::ERR_OBJECT);
        }
        
        if(filter_var($value, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE)===null) {
            return new ValidationResult(false, 'Not a valid boolean', self::ERR_NOBOOLEAN);
        }        
        return new ValidationResult(true);
    }
361387
public function setValue($value)
	{
		// any preparation goes here, for example casting to int
		$errors = $this->getValidationErrors($value);
		// if specific validation existed would go here & if
		// anything goes wrong will put error message into errors
		if(!empty($errors))
			throw $this->getContext()->getModel('ValidationException', 'Form', array(($errors)));
		return $value;
	}
821380
public function nestedValidate($value) : NestableResult
    {
        $outer = parent::validateSimple($value);

        // Fatal outer errors => no inner checks.
        $inner = $outer->isFatal() ? [] : $value;

        return new NestableResult($outer, array_map(function ($element) {
            return $this->inner instanceof NestableInterface
                ? $this->inner->nestedValidate($element)
                : $this->inner->validate($element);
        }, $inner));
    }
23953
protected function validatorValue($value)
    {
        if ($value === null) {
            return $this->allowEmpty;
        }

        if (preg_match($this->pattern, $value)) {
            return true;
        }

        return false;
    }
110551
protected function validate($value)
    {
        return Match::on(Option::create($this->validator->isValid($value), false))
            ->Monad_Option_Some(true)
            ->Monad_Option_None(
                function () {
                    $msgs = $this->validator->getMessages();
                    array_walk(
                        $msgs, 
                        function ($msg) {
                            $this->messenger->add(new StringType($msg));
                        }
                    );
                    return false;
                }
            )
            ->value();
    }
132956
public function validateValue( $value ) : bool
   {

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

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

   }
772147
public function validate($value)
    {
        return ($value instanceof \stdClass && count((array) $value) <= $this->size)
            || parent::validate($value);
    }
1358814
public function addValidation($validation, $value = null)
    {
        if (false === isset($this->validation[$validation])) {
            $this->validation[$validation] = [];
        }

        $this->validation[$validation][] = $value;

        return $this;
    }
628416
public function match($value)
    {
        usort($this->rules, array($this, 'sort'));

        foreach ($this->rules as $rule) {
            $match = $rule->match($value);

            if ($match === false) {
                continue;
            }

            $this->matchParams = $match;

            return $this->dependencyManager->get($rule->getController());
        }

        return $this->dependencyManager->get($this->catchallController);
    }
304720
protected function getErrorElement($value)
    {
        return new ErrorElement(
            $value,
            $this->constraintValidatorFactory,
            $this->context,
            $this->context->getGroup()
        );
    }