summaryrefslogtreecommitdiff
path: root/README.markdown
diff options
context:
space:
mode:
authorDavid Schmitt <david.schmitt@puppet.com>2016-08-14 13:50:22 +0100
committerGitHub <noreply@github.com>2016-08-14 13:50:22 +0100
commit1d9d2c02d6669d4a6219140ae7ff3648a30c89cf (patch)
tree709bcf434658a291ce9a87e3bc4639992141725b /README.markdown
parentf9c74fb04ecb9daccfa8b35b854ffd0601187a16 (diff)
parentadf922c28441bc95f5cbac1f0951256c080b3298 (diff)
Merge pull request #630 from HelenCampbell/validateLegacy
(MODULES-3540) 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.