specific file validation

Hi every one,

i want to add a validation rule for uploading a file :

upload can accept any file extension except aspecefic list of extensions.

for example : i can upload any type of file except .exe

i look into documentation and i found that we can just give lis of file extensions that can be accepted.

Any one have an idea ?

use a custom validator


array('myFile', 'myValidator')

public function myValidator()



   //use some kind of validation above


      $this->addError('myFile', 'invalid extension');