summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortphoney <tp@puppet.com>2017-08-02 12:42:16 +0100
committertphoney <tp@puppet.com>2017-08-02 12:42:16 +0100
commit30533970553e0d68854a2db5c3f6c87f86a0e8ff (patch)
treecd81aa4c4567cd347231bcc26a31a3153b503f53
parentc1a3acaed1b36cc104a50b34d5bddb818ddb5fd2 (diff)
MODULES-5382 Add documentation for email functions
-rw-r--r--README.md28
1 files changed, 28 insertions, 0 deletions
diff --git a/README.md b/README.md
index f8762cd..7813f19 100644
--- a/README.md
+++ b/README.md
@@ -1208,6 +1208,13 @@ Returns `true` if the string passed to this function is a syntactically correct
*Type*: rvalue.
+#### `is_email_address`
+
+Returns true if the string passed to this function is a valid email address.
+
+*Type*: rvalue.
+
+
#### `is_float`
**Deprecated. Will be removed in a future version of stdlib. See [`validate_legacy`](#validate_legacy).**
@@ -2029,6 +2036,27 @@ validate_domain_name('www.example.2com')
*Type*: statement.
+#### `validate_email_address`
+
+Validate that all values passed are valid email addresses. Fail compilation if any value fails this check.
+
+The following values will pass:
+
+~~~
+$my_email = "waldo@gmail.com"
+validate_email_address($my_email)
+validate_email_address("bob@gmail.com", "alice@gmail.com", $my_email)
+~~~
+
+The following values will fail, causing compilation to abort:
+
+~~~
+$some_array = [ 'bad_email@/d/efdf.com' ]
+validate_email_address($some_array)
+~~~
+
+*Type*: statement.
+
#### `validate_hash`
**Deprecated. Will be removed in a future version of stdlib. See [`validate_legacy`](#validate_legacy).**