summaryrefslogtreecommitdiff
path: root/README.markdown
diff options
context:
space:
mode:
authorDavid Schmitt <david.schmitt@puppetlabs.com>2015-09-17 18:48:32 +0100
committerDavid Schmitt <david.schmitt@puppetlabs.com>2015-09-17 18:48:32 +0100
commit55ece7815a8718507ef096db53a1e186102f1c8a (patch)
tree0948f9b0923904a87fc4dd146e2900b4f616a2c1 /README.markdown
parent399ce03f6806b2226d5bcee52ab22235842c6e38 (diff)
(MAINT) validate_re: Clarify docs and error message
Diffstat (limited to 'README.markdown')
-rw-r--r--README.markdown7
1 files changed, 7 insertions, 0 deletions
diff --git a/README.markdown b/README.markdown
index 8dd57f1..1cf7b32 100644
--- a/README.markdown
+++ b/README.markdown
@@ -1054,6 +1054,13 @@ test, and the second argument should be a stringified regular expression (withou
validate_re($::puppetversion, '^2.7', 'The $puppetversion fact value does not match 2.7')
~~~
+ Note: Compilation will also abort, if the first argument is not a String. Always use
+ quotes to force stringification:
+
+ ~~~
+ validate_re("${::operatingsystemmajrelease}", '^[57]$')
+ ~~~
+
*Type*: statement.
#### `validate_slength`