Perform validation against given value

@param $value

@return $this
547315
protected function validate(&$value)
    {
        $value = StdObjectWrapper::toBool($value);

        parent::validate($value);

        return $this;
    }
507361
protected function _validate($value)
    {
        $value = trim($value);
        $pattern = ComHashtagsDomainEntityHashtag::PATTERN_HASHTAG;

        return (is_string($value) && (preg_match($pattern, $value)) == 1);
    }
1191451
public function setValue($value)
    {
        if ($value == $this->getAttribute('value')) {
            $this->check();
        } else {
            $this->uncheck();
        }
        return $this;
    }
439861
public function eq($value) {
        $this->rule = $value;
        $this->check_role = 'eq';
        $result = !is_null($this->value) && $this->value == $value;
        $this->checkResult($result);
        return $this;
    }
850270
public function validate($value) {
        $dateTime = \DateTime::createFromFormat($this->format, $value);
        if(!$dateTime instanceof \DateTime || $dateTime->format($this->format)!=$value) {
            return new ValidationResult(false, 'Invalid date');
        }

        return new ValidationResult(true);
    }
249625
public function defaultValue($value) {
        $this->validated = false;
        $this->config[self::DEFAULT_VALUE] = $value;
        return $this;
    }
1277037
public function setContext($value)
    {
        validators\Text::validate($value, 255, 'Context id too long');
        $value = mb_substr($value, 0, 255, 'UTF-8');
        $this->parameters['context'] = $value;
        return $this;
    }
9145
public function setCurrent($value)
    {
        if (!StaticValidator::isValid('number', $value)) {
            return $this;
        }

        $this->_current = StaticFilter::filter('number',$value);
        $this->_offset = $this->_rowsPerPage * ($this->_current - 1);
        return $this;
    }
1028737
public function setValue($value)
    {
        $this->checked = $value;
        if ((null !== $this->checked) && ($this->hasChildren())) {
            foreach ($this->childNodes as $child) {
                if ($child instanceof Input\Radio) {
                    if ($child->getValue() == $this->checked) {
                        $child->check();
                    } else {
                        $child->uncheck();
                    }
                }
            }
        }
        return $this;
    }
270561
public function set($key, $value)
    {
        if (method_exists($this, 'validate' . ucfirst($key))) {
            $value = call_user_func([$this, 'validate' . ucfirst($key)], $value);
        }

        $this->checkKeyExistInDefault($key);

        $this->data[$key] = $value;

        return $this;
    }
1264848
public function validate($value) {
        $isDate = (new Date($this->format))->validate($value);
    
        if($isDate->isError()) {
            return $isDate;
        }
        
        if(\DateTime::createFromFormat($this->format, $value)>$this->max) {
            return new ValidationResult(false, 'Date is too late');
        }

        return new ValidationResult(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)));
    }
923706
public function validate($value) {
        if($this->sanitizable->getRawValue()===$value) {
            return new ValidationResult(true);
        }
        
        return new ValidationResult(false, 'The given value contains illegal characters');
    }
873849
public function validate($value) {
        if(!is_string($value)) {
            throw new DataType('value', 'string', $value);
        }
        
        if(!password_verify($value, $this->hash)) {
            return new ValidationResult(false, 'Wrong password');
        }        
        return new ValidationResult(true);
    }
399215
public function lt($value) {
        $this->rule = $value;
        $this->check_role = 'lt';
        $result = !is_null($this->value) && $this->value < $value;
        $this->checkResult($result);
        return $this;
    }
771937
public function setValue($value)
    {
        $this->value = $value;
        if ($value instanceof ValueAwareInterface) {
            $this->value = $value->getFormValue();
        }
        return $this;
    }
588690
public function validate($value)
    {
        $this->pushResult();
        if ($this->acceptsEmptyValues === false || $this->isEmpty($value) === false) {
            $this->isValid($value);
        }
        return $this->popResult();
    }