File type validation not working

2011-12-17 Thread Daniel
I have a file upload on an add view: echo $this-Form-input('filename', array('type' = 'file')); ... and I use the following validation in the model: var $validate = array( 'filename' = array( 'notempty' = array(

Re: File type validation not working

2011-12-17 Thread euromark
For starters I see two possibly unrelated issues: a) you should use last=true in every rule b) $value = array_shift($check) does the trick, as well but did you actually try to debug your code before asking here? I doubt that $value contains a string either way. Usually uploads are arrays after a