protected function getFileValidationRules()
    {
        $rules = array_get($this->field->options, 'validation', []);

        // If the 'image' rule is not set, make sure it is added.
        if (is_string($rules)) {
            if (empty($rules)) {
                $rules = 'image';
            } elseif ( ! preg_match('#(^|\|)image($|\|)#', $rules)) {
                $rules .= '|image';
            }
        } elseif ( ! in_array('image', $rules)) {
            array_unshift($rules, 'image');
        }

        return $rules;
    }