In this post I will show a way to customize the file upload with the forms framework. The forms framework provide the sfWidgetFormInputFile class to display a file input tag and the sfValidatorFile class which is the default class used to validate a file input field. As all validator classes sfValidatorFile check if the field value is ok according to the validation options, but instead of returning a "basic" value such as an integer or a string, this validator will return an instance of sfValidatedFile as a clean value.
Tag - validator
Monday, April 5 2010
Custom sfValidatorFile and sfValidatedFile
By eNk` on Monday, April 5 2010, 10:56 - Symfony