summaryrefslogtreecommitdiff
path: root/README.markdown
diff options
context:
space:
mode:
authorHelen Campbell <helen@puppetlabs.com>2016-08-10 14:17:16 +0100
committerHelen Campbell <helen@puppetlabs.com>2016-08-11 18:59:15 +0100
commitadf922c28441bc95f5cbac1f0951256c080b3298 (patch)
tree709bcf434658a291ce9a87e3bc4639992141725b /README.markdown
parent999c267a3871c7d59513869c94c43c3477f1c6f1 (diff)
(WIP) Addition of validate legacy function
Diffstat (limited to 'README.markdown')
-rw-r--r--README.markdown11
1 files changed, 11 insertions, 0 deletions
diff --git a/README.markdown b/README.markdown
index 0666b37..26fe55f 100644
--- a/README.markdown
+++ b/README.markdown
@@ -1368,6 +1368,17 @@ The following values will fail, causing compilation to abort:
~~~
+#### `validate_legacy`
+
+Validates a value against both a specified type and a deprecated validation function. Silently passes if both pass, errors if one validation passes and the other does not, fails if both validations return false.
+Arguments include the type to check the value against, the full name of the previous validation function, the value itself to be checked, and an unspecified amount of arguments needed for the previous validation function.
+
+Example:
+
+ ~~~
+ validate_legacy("Optional[String]", "validate_re", "Value to be validated", ["."])
+ ~~~
+
#### `validate_numeric`
Validates that the first argument is a numeric value (or an array of numeric values). Aborts catalog compilation if any of the checks fail.