// My Code
$this->add(
'image',
new File(
[
'maxSize' => '2M',
'messageSize' => ':field überschreitet die maximale Dateigröße :max',
'allowedTypes' => [
'image/jpeg',
'image/png',
],
'messageType' => 'Erlaubte Datentypen: :types',
]
)
);
// Example from Phalcon Docs
$validator->add(
"file",
new FileValidator(
[
"maxSize" => "2M",
"messageSize" => ":field exceeds the max filesize (:max)",
"allowedTypes" => [
"image/jpeg",
"image/png",
],
"messageType" => "Allowed file types are :types",
"maxResolution" => "800x600",
"messageMaxResolution" => "Max resolution of :field is :max",
]
)
);
I can override the messageType but when I try to override the messageSize it always shows the default.