Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@gmail.com>2013-11-18 00:54:55 +0400
committerThomas Steur <thomas.steur@gmail.com>2013-11-18 00:54:55 +0400
commitb1468d3bcd07d366b09c93b7fced40ce30adabca (patch)
tree1cc104f409c2e6b5edabe38a4199bff7ff3c9ad7 /core/QuickForm2.php
parent9793994856e74027ab1a7b8aea05173accf6654a (diff)
added method to get all error messages
Diffstat (limited to 'core/QuickForm2.php')
-rw-r--r--core/QuickForm2.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/core/QuickForm2.php b/core/QuickForm2.php
index bbdc39e4c5..40d7f1246c 100644
--- a/core/QuickForm2.php
+++ b/core/QuickForm2.php
@@ -110,6 +110,17 @@ abstract class QuickForm2 extends HTML_QuickForm2
return isset($value[$elementName]) ? $value[$elementName] : null;
}
+ public function getErrorMessages()
+ {
+ $messages = array();
+
+ foreach ($this as $element) {
+ $messages[] = $element->getError();
+ }
+
+ return array_filter($messages);
+ }
+
/**
* Returns the rendered form as an array.
*