From 1af15f6d05cd4ce4b4688b3aefb807e277ceff4f Mon Sep 17 00:00:00 2001 From: Ali Pourhabibi Date: Fri, 12 Jul 2024 15:06:21 +0330 Subject: [PATCH] doc(phone_numbers): Add docs for phone_numbers to README --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index eca2878..90e3bdb 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ - [X] Add and remove commas to numbers. - [X] Find city and province name by national code(code-e Melli). - [X] Validate Iranian national number(code-e Melli). +- [X] Validate and find information of phone number. #### How to use it? @@ -117,4 +118,13 @@ verifyIranianNationalIdFalse := national_id.Validate("0684159415") fmt.Printf("\n Validate NationalID : %v \n", verifyIranianNationalId) // true fmt.Printf("\n Validate NationalIDFalse : %v \n", verifyIranianNationalIdFalse) // false -``` \ No newline at end of file +``` + +###### Validate and find information of phone number. +```go +phone_numbers.IsPhoneValid("9122221811") // true +phone_numbers.GetPhoneDetails("09195431812") // 09373708555 +phone_numbers.GetOperatorPrefix("+989373708555") // 937 +phone_numbers.GetPrefixDetails("901") // &{کشوری [] Irancell [Credit Permanent]} +phone_numbers.GetPhoneDetails("09195431812") // &{تهران [البرز سمنان قم قزوین زنجان] MCI [Credit]} +```