Validation file upload CakePHP

Posted by kicaj on Stack Overflow See other posts from Stack Overflow or by kicaj
Published on 2010-05-01T13:56:17Z Indexed on 2010/05/01 13:57 UTC
Read the original article Hit count: 181

Filed under:
|
|

How validate file upload in CakePHP? When i wrote some like this:var $validate = array( 'file' => array( 'select' => array( 'rule' => array('selectFile', false), 'message' => 'There is no file!'), 'type' => array( 'rule' => array('typeFile'), 'message' => 'Bad type!'), 'size' => array( 'rule' => array('sizeFile'), 'message' => 'Bad with size!'))); Works only with the last validate, here 'size'. Maybe You know solution, for validation for files with many messages?

© Stack Overflow or respective owner

Related posts about cakephp

Related posts about validation