phalcon/cphalcon — pull request #2945 by dreamsxin (2014-10-25 07:08:02+00:00)
Title: Image valid

```php
$file = 'Phalcon.png';
$validator = new \Phalcon\Validation\Validator\File();
$mimes = array('image/png', 'image/jpeg');
$minwidth = 100;
$maxwidth = 1024;
$minheight = 100;
$maxheight = 1024;
if (!$validator->valid($file, $minsize, $maxsize, $mimes, $minwidth, $maxwidth, $minheight, $maxheight)) {
var_dump($validator->getType());exit;
}
```