protected function checkValue($multipleUploads)
    {
        if ($this->getRequired() && !$multipleUploads && (is_null($this->value) || $this->value == '')) {
            $this->error = $this->getLabel() . ' is required.';
            return false;
        }

        if ($this->getPattern() && !preg_match('/' . $this->getPattern() . '/', $this->value)) {
            $this->error = 'Invalid value entered.';
            return false;
        }

        return true;
    }
protected function checkValue($multipleUploads)
    {
        if ($this->getRequired() && !$multipleUploads && (is_null($this->value) || $this->value == '')) {
            $this->error = $this->getLabel() . ' is required.';
            return false;
        }

        if ($this->getPattern() && !preg_match('/' . $this->getPattern() . '/', $this->value)) {
            $this->error = 'Invalid value entered.';
            return false;
        }

        return true;
    }
protected function checkValue ( $ multipleUploads ) { if ( $ this -> getRequired ( ) && ! $ multipleUploads && ( is_null ( $ this -> value ) || $ this -> value == '' ) ) { $ this -> error = $ this -> getLabel ( ) . ' is required.' ; return false ; } if ( $ this -> getPattern ( ) && ! preg_match ( '/' . $ this -> getPattern ( ) . '/' , $ this -> value ) ) { $ this -> error = 'Invalid value entered.' ; return false ; } return true ; }
Check whether the correct value has been entered based on multiple or single upload

@param bool $multipleUploads
@return bool
Check whether the correct value has been entered based on multiple or single upload