Hi All Why i Create a custom function for valide only uploaded imagem files?
In cake/libs/validators.php is possible create a custom validade, but only using regular expressions, right? I'd like to create a custom validade for example which these code: <?php function validateImage($field){ $imagetypes = array( 'image/jpeg', // images 'image/pjpeg', 'image/png', 'image/gif', 'image/tiff', 'image/x-tiff'); if(!in_array($field['type'],$imagetypes)){ return true; }else{ return false; } } print validateImage('dddd'); ?> thanks! Petry --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---