diff options
author | Paula McMaw <paula@puppet.com> | 2017-08-02 14:49:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-02 14:49:28 +0100 |
commit | 21146b02acb1ff5cc37b97122f9b94c198fe0ec4 (patch) | |
tree | cd81aa4c4567cd347231bcc26a31a3153b503f53 | |
parent | c1a3acaed1b36cc104a50b34d5bddb818ddb5fd2 (diff) | |
parent | 30533970553e0d68854a2db5c3f6c87f86a0e8ff (diff) |
Merge pull request #800 from tphoney/MODULES-5382
MODULES-5382 Add documentation for email functions
-rw-r--r-- | README.md | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -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).** |