puppetlabs/puppetlabs-stdlib — pull request #37 by fiddyspence (2012-02-22 17:39:30+00:00)
Title: (#12776) Added validate_slength function and rspec test

This function is used to validate a string is less than a maximum length. The
string, or array of strings, is passed as the first argument to the function.
The maximum length of the string is passed as the second argument.

It is useful to validate, for example, that Puppet is not sending a username
to a downstream system that the system cannot cope with, but that might not
cause an error message - for example, MySQL will not accept a username of
more than 16 characters. This enables a Puppet administrator to validate
the data that it may have been passed from upstream through, for example,
Hiera.