Form: Don't transmit duplicate error messages
Zend_Form::getMessages() already returns custom error messages, if there are any
This commit is contained in:
parent
b93dc06f5b
commit
96c96df636
|
@ -1169,9 +1169,7 @@ class Form extends Zend_Form
|
|||
$this->getView()->layout()->redirectUrl = $this->getRedirectUrl()->getAbsoluteUrl();
|
||||
}
|
||||
} elseif ($this->getIsApiTarget()) {
|
||||
$this->getResponse()->json()->setFailData(
|
||||
array_merge($this->getMessages(), $this->getErrorMessages())
|
||||
)->sendResponse();
|
||||
$this->getResponse()->json()->setFailData($this->getMessages())->sendResponse();
|
||||
}
|
||||
} elseif ($this->getValidatePartial()) {
|
||||
// The form can't be processed but we may want to show validation errors though
|
||||
|
|
Loading…
Reference in New Issue