I have a form.
It's checked: $isValid = $form->isValid($this->getRequest()->getPost())
The problem is errors are empty.
$form->getErrors()
returns array {"field1": [], "field2": [], "field3": [], "field4": []}
when form is invalid.
So inner arrays are empty. What should I do to find why form is invalid? Code is not developed by me, but there is nothing suspicious in it.
You could use $form->getMessages()
to get the error messages.
$form->isValid($this->_getAllParams());
$form_messages = $form->getMessages();
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.