ZF-2941: retrieve the messages a validator is using
Description
Currently there is no way to retrieve the messages a validator is using
I can't think of any simple example right now, but anyway a getMethod doesn't hurt, does it?
I'm using this to obtain the keys of this array, someone else might need the values (and keys)
Index: Validate/Abstract.php
===================================================================
--- Validate/Abstract.php (revision 8963)
+++ Validate/Abstract.php (working copy)
@@ -99,6 +99,10 @@
{
return $this->_messages;
}
+
+ public function getMessageTemplates() {
+ return $this->_messageTemplates;
+ }
/**
* Returns an array of the names of variables that are used in constructing validation failure messages
Comments
Posted by Wil Sinclair (wil) on 2008-03-25T22:02:50.000+0000
Resetting 'fix version priority' and 'fix version' to be re-evaluated for next release.
Posted by Thomas Weidner (thomas) on 2009-03-13T13:42:37.000+0000
Feature added with r14317.