No file was uploaded error Zend framework 3 validation

I want use Callback validation but continue_if_empty not working for File it’s returning No file was uploaded error. But everything working for Input and Select . I need help with this.

$this->add([
    'name' => 'images',
    'type' => FileInput::class,
    'required' => false,
    'allow_empty' => true,
    'continue_if_empty' => true,
    'filters' => [
        [
            'name' => Rename::class,
            'options' => [
                'target' => '/var/www/project/public/website/content/tmp/image_' . md5(time()),
                'randomize' => true,
            ],
        ],  
   ],
   'validators' => [
       [
            'name' => Callback::class,
            'options' => [
                'callback' => [$this, 'imageValidator'],
            ],
       ],
    ],
]);


public function imageValidator($value, $context)
{
    dd($context);
}

Hello and welcome to the forums! :smiley:

It works differently than you think:

Therefore remove continue_if_empty from your input specification and you will get the result what you expected.