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;
    }