Commit graph

2 commits

Author SHA1 Message Date
Jeff McCune
b9f1bb6a63 Add validate_bool() function to stdlib
This function aborts catalog compilation if any of the passed
values are not true or false.  Note, this catches the string
values of true and false correct and will abort catalog
compilation if they are not boolean values.

Paired-with: Dan Bode <dan@puppetlabs.com>
2011-06-03 11:39:45 -07:00
Jeff McCune
d381a5b74f (#7657) Add basic validate_re function
While developing Puppet Modules with class parameters, data from the
user should be validated as per the Style Guide.  Puppet should fail
early and hard in the situation of invalid data being passed into the
module.

This function provides a more concise method to the alternative of using
if statements in the Puppet manifests.
2011-05-25 12:38:15 -07:00