summaryrefslogtreecommitdiff
path: root/README.markdown
diff options
context:
space:
mode:
Diffstat (limited to 'README.markdown')
-rw-r--r--README.markdown16
1 files changed, 16 insertions, 0 deletions
diff --git a/README.markdown b/README.markdown
index a89a7fe..03a7284 100644
--- a/README.markdown
+++ b/README.markdown
@@ -70,3 +70,19 @@ The following values will fail, causing compilation to abort:
validate_nonemptyarray('some_string')
$undefined = undef
validate_nonemptyarray($undefined)
+
+validate_nonemptyarray_msg
+--------------------------
+Validate that the passed value is an array data structure. Abort catalog
+compilation if any value fails this check. Also abort if any of the arrays
+is empty. On failure it prints the message given as the second argument.
+
+The following values will pass:
+
+ $my_array = [ 'one', 'two' ]
+ validate_nonemptyarray_msg($my_array, 'foo')
+
+The following values will fail, causing compilation to abort with the given msg:
+
+ validate_nonemptyarray_msg(true, 'Not a nonempty array')
+ validate_nonemptyarray_msg([], 'Not a nonempty array')