diff options
author | Morgan Haskel <morgan@puppetlabs.com> | 2015-07-09 10:20:37 -0700 |
---|---|---|
committer | Morgan Haskel <morgan@puppetlabs.com> | 2015-07-09 10:20:37 -0700 |
commit | 07c38e518a19892bd6c77314d65e2209ebddc48d (patch) | |
tree | ca3bdbdfee6c8f3625c8a35250b5cb69921fb873 /README.markdown | |
parent | b2aed66226b4fe33fe24252eab7a6e64a4a03ddd (diff) | |
parent | c64ecfb0c39b633675269ab02f323f7eb486dad4 (diff) |
Merge pull request #482 from DavidS/document_validate_slength_3rd_arg
Add validate_slength's optional 3rd arg to README
Diffstat (limited to 'README.markdown')
-rw-r--r-- | README.markdown | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/README.markdown b/README.markdown index 8ed3d9b..4dcdc2e 100644 --- a/README.markdown +++ b/README.markdown @@ -938,13 +938,14 @@ test, and the second argument should be a stringified regular expression (withou #### `validate_slength` -Validates that the first argument is a string (or an array of strings), and is less than or equal to the length of the second argument. It fails if the first argument is not a string or array of strings, or if arg 2 is not convertable to a number. +Validates that the first argument is a string (or an array of strings), and is less than or equal to the length of the second argument. It fails if the first argument is not a string or array of strings, or if arg 2 is not convertable to a number. Optionally, a minimum string length can be given as the third argument. The following values pass: ~~~ validate_slength("discombobulate",17) validate_slength(["discombobulate","moo"],17) + validate_slength(["discombobulate","moo"],17,3) ~~~ The following values fail: @@ -952,6 +953,7 @@ Validates that the first argument is a string (or an array of strings), and is l ~~~ validate_slength("discombobulate",1) validate_slength(["discombobulate","thermometer"],5) + validate_slength(["discombobulate","moo"],17,10) ~~~ *Type*: statement. |