summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md4
-rw-r--r--types/mac.pp2
2 files changed, 6 insertions, 0 deletions
diff --git a/README.md b/README.md
index 629b252..a8b93ca 100644
--- a/README.md
+++ b/README.md
@@ -301,6 +301,10 @@ Unacceptable input example:
httds://notquiteright.org
```
+#### `Stdlib::MAC`
+
+Matches MAC addresses defined in [RFC5342](https://tools.ietf.org/html/rfc5342).
+
#### `Stdlib::Unixpath`
Matches paths on Unix operating systems.
diff --git a/types/mac.pp b/types/mac.pp
new file mode 100644
index 0000000..4103574
--- /dev/null
+++ b/types/mac.pp
@@ -0,0 +1,2 @@
+# A type for a MAC address
+type Stdlib::MAC = Pattern[/^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$/]