protected function applyRules()
    {
        // Check if there are rules for this field
        $rules_key = 'images.' . ($this->name ?: 'default');
        if (!$rules = Former::getRules($rules_key)) {
            return;
        }

        // If there already is an image, drop the forced requirement
        if ($this->hasImage() && array_key_exists('required', $rules)) {
            unset($rules['required']);
            $this->addClass('required'); // So the icon shows up
        }

        // Apply rules using Former's LiveValidation
        $live = new LiveValidation($this);
        $live->apply($rules);
    }