Overtrue\Validation\Validator::passesOptionalCheck PHP 메소드

passesOptionalCheck() 보호된 메소드

Determine if the attribute passes any optional check.
protected passesOptionalCheck ( string $attribute ) : boolean
$attribute string
리턴 boolean
    protected function passesOptionalCheck($attribute)
    {
        if ($this->hasRule($attribute, ['Sometimes'])) {
            return array_key_exists($attribute, array_dot($this->data)) || array_key_exists($attribute, $this->files);
        }
        return true;
    }
Validator