summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorFrank de Jong <frapex@xs4all.nl>2017-07-08 09:43:40 +0200
committerFrank de Jong <frapex@xs4all.nl>2017-07-08 09:43:40 +0200
commitfe7ccd8b89556cc6cc1f5ea7f58b5ac2aedb23ec (patch)
tree04388c258342c0d148ed08a56fbaafe0bf88a2f0 /README.md
parent5a17bf1c338c74bd6c8dbacc9a05b4cd501ecc23 (diff)
Add validate_domain_name function
Diffstat (limited to 'README.md')
-rw-r--r--README.md26
1 files changed, 26 insertions, 0 deletions
diff --git a/README.md b/README.md
index 61318ea..1647fcf 100644
--- a/README.md
+++ b/README.md
@@ -1958,6 +1958,32 @@ validate_cmd($haproxycontent, '/usr/sbin/haproxy -f % -c', 'Haproxy failed to va
*Type*: statement.
+#### `validate_domain_name`
+
+**Deprecated. Will be removed in a future version of stdlib. See [`validate_legacy`](#validate_legacy).**
+
+Validate that all values passed are syntactically correct domain names. Aborts catalog compilation if any value fails this check.
+
+The following values pass:
+
+~~~
+$my_domain_name = 'server.domain.tld'
+validate_domain_name($my_domain_name)
+validate_domain_name('domain.tld', 'puppet.com', $my_domain_name)
+~~~
+
+The following values fail, causing compilation to abort:
+
+~~~
+validate_domain_name(1)
+validate_domain_name(true)
+validate_domain_name('invalid domain')
+validate_domain_name('-foo.example.com')
+validate_domain_name('www.example.2com')
+~~~
+
+*Type*: statement.
+
#### `validate_hash`
**Deprecated. Will be removed in a future version of stdlib. See [`validate_legacy`](#validate_legacy).**