protected function checkValue(&$errors = [])
    {
        if ($this->getRequired() && !array_key_exists($this->getName(), $_FILES)) {
            $errors[] = $this->getLabel() . ' is required.';
            $this->error = $this->getLabel() . ' is required.';
            return false;
        }

        return true;
    }
protected function checkValue(&$errors = [])
    {
        if ($this->getRequired() && !array_key_exists($this->getName(), $_FILES)) {
            $errors[] = $this->getLabel() . ' is required.';
            $this->error = $this->getLabel() . ' is required.';
            return false;
        }

        return true;
    }
protected function checkValue ( & $ errors = [ ] ) { if ( $ this -> getRequired ( ) && ! array_key_exists ( $ this -> getName ( ) , $ _FILES ) ) { $ errors [ ] = $ this -> getLabel ( ) . ' is required.' ; $ this -> error = $ this -> getLabel ( ) . ' is required.' ; return false ; } return true ; }
Check whether the correct value has been entered

@return bool
Check whether the correct value has been entered