Issues

ZF-4371: Accessing all error messages

Description

Hi,

I added a getter method for retrieving all possible errors of a validator. I added this function to Validate/Abstract.php:

public function getPossibleMessages() { return $this->_messageTemplates; }

(Note: I needed this, because I wanted to use the same messages for a client-side validation which is executed before an ajax validation. So I render all messages in invisible containers and make them visible via JS)

Maybe there are other cases, where it also makes sense to access all possible errors, not only those which actually occured, from the outside? Or is there a reason behind it, that the messages aren't accessible?

Kirsten

Comments

Feature added with r14317. See ZF-2941