Overtrue\Validation\Validator::validateFilled PHP Method

validateFilled() protected method

Validate the given attribute is filled if it is present.
protected validateFilled ( string $attribute, mixed $value ) : boolean
$attribute string
$value mixed
return boolean
    protected function validateFilled($attribute, $value)
    {
        if (array_key_exists($attribute, $this->data) || array_key_exists($attribute, $this->files)) {
            return $this->validateRequired($attribute, $value);
        } else {
            return true;
        }
    }
Validator