From c64ecfb0c39b633675269ab02f323f7eb486dad4 Mon Sep 17 00:00:00 2001 From: Alexander Fisher Date: Mon, 6 Jul 2015 17:03:49 +0100 Subject: Add validate_slength's optional 3rd arg to README --- README.markdown | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'README.markdown') 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. -- cgit v1.2.3