Determine if the attribute is validatable.

@param  string  $rule
@param  string  $attribute
@param  mixed   $value
@return bool
189491
protected function isValidatable($rule, $attribute, $value)
    {
        return $this->presentOrRuleIsImplicit($rule, $attribute, $value) &&
               $this->passesOptionalCheck($attribute) &&
               $this->hasNotFailedPreviousRuleIfPresenceRule($rule, $attribute);
    }
634671
protected function validateAttributeInternal($model, $attribute)
    {
        $value = $model->{$attribute};

        $result = ($this->type == FormatHelper::TYPE_LIST)
            ? $this->validateListValue($model, $value)
            : $this->validateValue($value);

        if (!empty($result)) {
            $this->addError($model, $attribute, $result[0], $result[1]);

            return;
        }

        Yii::info('Type validation success'
            . PHP_EOL . "Result value for '$attribute': {$this->filteredAttribute}", __METHOD__);
        $model->{$attribute} = $this->filteredAttribute;
    }
104287
protected function validateAttribute( $rule, $attribute )
	{
		list( $rule, $parameters ) = $this->parseRule( $rule );

		if( $rule == '' )return;

		$method = "validate{$rule}";

		if( !method_exists( $this, $method )) {
			throw new BadMethodCallException( "Method [$method] does not exist." );
		}

		if( !$this->$method( $this->getValue( $attribute ), $attribute, $parameters )) {
			$this->addFailure( $attribute, $rule, $parameters );
		}
	}
1365203
public function validateAttribute($model, $attribute)
    {
        $this->_model = $model;
        $this->_attributeName = $attribute;
        $result = $this->validateValue($model->$attribute);
        if (!empty($result)) {
            $this->addError($model, $attribute, $result[0], $result[1]);
        }
    }
327795
protected function validateMax($attribute, $value, $parameters)
    {
        $this->requireParameterCount(1, $parameters, 'max');

        if (!empty($value['tmp_name']) && is_uploaded_file($value['tmp_name']) && $value['error']) {
            return false;
        }

        return $this->getSize($attribute, $value) <= $parameters[0];
    }
1165871
protected function presentOrRuleIsImplicit($rule, $attribute, $value)
    {
        return $this->validateRequired($attribute, $value) || $this->isImplicit($rule);
    }
700879
protected function sanitizeAttribute($attribute, $value)
    {
        foreach ($this->rules->get($attribute) as $rule) {
            $value = $this->applyFilter($rule['name'], $value, $rule['options']);
        }

        return $value;
    }
771120
protected function validateRequired($attribute, $value)
    {
        if (is_null($value)) {
            return false;
        } elseif (is_string($value) && trim($value) === '') {
            return false;
        } elseif (is_array($value) && count($value) < 1) {
            return false;
        } elseif (in_array($value, $_FILES, true)) {
            return (string) $value['tmp_name'] !== '';
        }

        return true;
    }
928559
public function validateDateFormat($attribute, $value, $parameters)
    {
        $this->requireParameterCount(1, $parameters, 'date_format');

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

        $format = $parameters[0];

        $date = DateTime::createFromFormat('!'.$format, $value);

        return $date && $date->format($format) == $value;
    }
10001
public function validateDifferent($attribute, $value, $parameters)
    {
        $this->requireParameterCount(1, $parameters, 'different');

        foreach ($parameters as $parameter) {
            if (! Arr::has($this->data, $parameter)) {
                return false;
            }

            $other = Arr::get($this->data, $parameter);

            if ($value === $other) {
                return false;
            }
        }

        return true;
    }
552844
protected function validateAttribute (string $attribute=NULL) : bool
	{
		if (!property_exists($this, $attribute))
		{
			$this->error = "Attribute: ".ucfirst($attribute)." is not a class object.";
        	return FALSE;
		}
        $result = (is_array($this->$attribute)) ? !empty($this->$attribute) : Validate::hasValue($this->$attribute);
        if ($result) return TRUE;
		$this->error = "Set ".ucfirst($attribute)." to log your message.";
    	return FALSE;
	}
366346
protected function validateFilled($attribute, $value)
    {
        if (array_key_exists($attribute, $this->data) || array_key_exists($attribute, $this->files)) {
            return $this->validateRequired($attribute, $value);
        }

        return true;
    }
505852
protected function validateBefore($attribute, $value, $parameters)
	{
		if ( ! ($date = strtotime($parameters[0])))
		{
			return strtotime($value) < strtotime($this->getValue($parameters[0]));
		}
		else
		{
			return strtotime($value) < $date;
		}
	}
1238146
protected function validateRequiredWith($attribute, $value, $parameters)
    {
        if (! $this->allFailingRequired($parameters)) {
            return $this->validateRequired($attribute, $value);
        }

        return true;
    }
396353
public function validate($value, $validator, $attributes)
    {
        $validator = $this->getValidator($validator);

        $result = $validator->validate($value, $attributes);

        return $negative ? ! $result : $result;
    }
887529
public function isValid(array $attributes, $rules = 'rules')
    {
        //validator
        $validator = $this->factory->make($attributes, static::${$rules});

        //passes validation
        if (!$validator->fails()) {
            return true;
        }

        //set errors
        $this->errors = $validator->getMessageBag();

        //return
        return false;
    }
739438
protected function validateDateFormat( $attribute, $value, $parameters )
	{
		$this->requireParameterCount( 1, $parameters, 'date_format' );

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

		$parsed = date_parse_from_format( $parameters[0], $value );

		return $parsed['error_count'] === 0 && $parsed['warning_count'] === 0;
	}