maxSize is not showing any message on selecting a large file

i have this in my user model

array('picture','file','types'=>'jpg, jpeg, gif, png','maxSize'=>1024*1024*2,'tooLarge'=>'The File is Too large to be uploaded. Maximum is 2Mb','allowEmpty'=>true),

and i m using this in my controller



                 $model->picture= CUploadedFile::getInstance($model,'picture');


but when ever i try to upload a file more than 2Mb it never shows any warning message, but it renders the same page again.

can anyone tell me that what could be wrong???

If i understand the API ( ) correct the validation starts at the moment you call


Are you calling the save() method somewhere?

i am using this: