public function registerValidators(AgaviValidationManager $vm, array $depends, array $parameters=array(), array $files=array())
	{
		if(isset($files[$this->name]))
		{
			if($files[$this->name] instanceof AgaviUploadedFile and !$files[$this->name]->hasError())
			{
				$errors = $this->getValidationErrors($files[$this->name]);
				if(empty($errors))
				{
					$this->value = $files[$this->name];
				}
			}
		}
		$vm->createValidator(
			'AgaviFileValidator',
			array($this->name),
			array(
				'' => 'field is required',
				'mime_type' => 'format of uploaded file is not acceptable'
			),
			array( // parameters
				'name' => $this->name,
				'mime_type' => empty($this->types)?'/.*/':'#^'.implode('$|^', $this->types).'$#',
				'translation_domain' => AgaviConfig::get('Form.TranslationDomain'),
				'required' => (bool) $this->required
			)
		);
	}