public function onValidate(ValidationEvent $event)
    {
        try {
            $this->validator->validate(
                $event->getType(),
                $event->getFile(),
                'upload_validators'
            );
        } catch (JbFileUploaderValidationException $e) {
            throw new ValidationException($e->getMessage(), null, $e);
        }
    }
public function onValidate(ValidationEvent $event)
    {
        try {
            $this->validator->validate(
                $event->getType(),
                $event->getFile(),
                'upload_validators'
            );
        } catch (JbFileUploaderValidationException $e) {
            throw new ValidationException($e->getMessage(), null, $e);
        }
    }
public function onValidate ( ValidationEvent $ event ) { try { $ this -> validator -> validate ( $ event -> getType ( ) , $ event -> getFile ( ) , 'upload_validators' ) ; } catch ( JbFileUploaderValidationException $ e ) { throw new ValidationException ( $ e -> getMessage ( ) , null , $ e ) ; } }
Validate a submited file

@param ValidationEvent $event
@throws \Oneup\UploaderBundle\Uploader\Exception\ValidationException
Validate a submited file