From 0bfda52ce19be4e573f45f20b8b5129197ed62e2 Mon Sep 17 00:00:00 2001 From: Taylor Date: Tue, 7 Jul 2020 14:16:52 -0600 Subject: [PATCH 1/2] Add e164 to doc.go --- README.md | 2 +- doc.go | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f552826..3990cfe 100644 --- a/README.md +++ b/README.md @@ -145,6 +145,7 @@ Baked-in Validations | btc_addr | Bitcoin Address | | btc_addr_bech32 | Bitcoin Bech32 Address (segwit) | | datetime | Datetime | +| e164 | e164 formatted phone number | | email | E-mail String | eth_addr | Ethereum Address | | hexadecimal | Hexadecimal String | @@ -185,7 +186,6 @@ Baked-in Validations | Tag | Description | | - | - | | dir | Directory | -| e164 | NOT DOCUMENTED IN doc.go | | endswith | Ends With | | excludes | Excludes | | excludesall | Excludes All | diff --git a/doc.go b/doc.go index 4aba75f..96c5e0b 100644 --- a/doc.go +++ b/doc.go @@ -684,6 +684,13 @@ This validates that a string value contains a valid hsla color Usage: hsla +E.164 Phone Number String + +This validates that a string value contains a valid E.164 Phone number +for example +1123456789 + + Usage: e164 + E-mail String This validates that a string value contains a valid email From 07a4b7aa38adb7e99bdf5ad1c918f86370e1d69c Mon Sep 17 00:00:00 2001 From: Taylor Date: Tue, 7 Jul 2020 14:19:33 -0600 Subject: [PATCH 2/2] Add wiki link for E.164 --- doc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc.go b/doc.go index 96c5e0b..46d0ec9 100644 --- a/doc.go +++ b/doc.go @@ -687,7 +687,7 @@ This validates that a string value contains a valid hsla color E.164 Phone Number String This validates that a string value contains a valid E.164 Phone number -for example +1123456789 +https://en.wikipedia.org/wiki/E.164 (ex. +1123456789) Usage: e164