extends abstract class Phalcon\Validation\Validator
implements Phalcon\Validation\ValidatorInterface
Source on GitHub
Checks if a value has a correct file
use Phalcon\Validation\Validator\File as FileValidator;
$validator->add('file', new FileValidator([
'maxSize' => '2M',
'messageSize' => ':field exceeds the max filesize (:max)',
'allowedTypes' => array('image/jpeg', 'image/png'),
'messageType' => 'Allowed file types are :types',
'maxResolution' =>