This is a (multiple allowed):
[ ] feature-discussion (RFC)
CakePHP Version: 3,4,3
$validator
->add('image', 'file', [
'rule' => ['mimeType', ['image/jpeg', 'image/png']]
])
// ->add('image', [
// 'validExtension' => [
// 'rule' => ['extension',['png','jpeg','jpg']], // default ['gif', 'jpeg', 'png', 'jpg']
// 'message' => __('validExtension error')
// ]
//])
;
validExtension is not work in cake 3.4.3 and returned error with validExtension error message
but works correctly in cake 3.3.x
i used some config (model/entity/controller/ sql schema )
i see https://book.cakephp.org/3.0/en/appendices/3-4-migration-guide.html but there is not any docs for this
controller code
$entity = $this->Images->newEntity();
$entity = $this->Images->patchEntity($entity, $this->request->data);
Duplicate of #10267, fixed in #10297
CakePHP Version: 3,4,3
3.4.3 hasn't even been released, latest is 3.4.2 :)
Most helpful comment
3.4.3 hasn't even been released, latest is 3.4.2 :)