Esempio n. 1
0
 /**
  *
  * @param type $min
  * @param type $max
  * @param type $messages_prefixed
  * @return \Zend_Validate_File_Size 
  */
 protected function _getValidatorFileSize($min = 0, $max = "200kB", $messages_prefixed = "")
 {
     $file = new Zend_Validate_File_Size(array('min' => $min, 'max' => $max));
     $file->setMessage(sprintf($this->_translate('ERROR_FILE_TO_BIG'), $this->_translate($messages_prefixed), $max), Zend_Validate_File_Size::TOO_BIG);
     $file->setMessage(sprintf($this->_translate('ERROR_FILE_TO_SMAILL'), $this->_translate($messages_prefixed), $min), Zend_Validate_File_Size::TOO_SMALL);
     return $file;
 }