From c9370f4e3ae97b1e752713102a98af2979b1e9be Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Sat, 15 Jul 2017 11:21:08 +0200 Subject: add type for MAC address --- types/mac.pp | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 types/mac.pp 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})$/] -- cgit v1.2.3 From d773497f95d6dd24a9a94a0faf13336d8de41d8e Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Thu, 27 Jul 2017 01:08:31 +0200 Subject: add documentation --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 61318ea..6848b92 100644 --- a/README.md +++ b/README.md @@ -289,6 +289,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. -- cgit v1.2.3