Пример #1
0
 /**
  * Fügt angepasste Nachrichten für Validierungen hinzu.
  * @param Zend_Form_Element $element
  */
 protected function applyCustomMessages($element)
 {
     if ($element->isRequired()) {
         // wenn Validator 'notEmpty' bereits gesetzt ist; nicht modifizieren
         if (!$element->getValidator('notEmpty') && $element->autoInsertNotEmptyValidator()) {
             $notEmptyValidator = new Zend_Validate_NotEmpty();
             $notEmptyValidator->setMessage('admin_validate_error_notempty');
             $element->addValidator($notEmptyValidator);
         }
     }
 }