From b7b695af2330057b53887071007d5e5f897c3599 Mon Sep 17 00:00:00 2001 From: Ahmed_Adel <109729603+ahmeda335@users.noreply.github.com> Date: Tue, 27 Aug 2024 12:16:26 +0300 Subject: [PATCH] Update phone_numbers.py Adding Regex for Phone Numbers in EGYPT --- outlines/types/phone_numbers.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/outlines/types/phone_numbers.py b/outlines/types/phone_numbers.py index 618687e75..63e9a9a75 100644 --- a/outlines/types/phone_numbers.py +++ b/outlines/types/phone_numbers.py @@ -14,3 +14,11 @@ str, WithJsonSchema({"type": "string", "pattern": US_PHONE_NUMBER}), ] + +# Phone numbers in Egypt. +EGYPT_PHONE_NUMBER = r"^01[0-2,5]{1}[0-9]{8}$" + +EgpytPhoneNumber = Annotated[ + str, + WithJsonSchema({"type": "string", "pattern": EGYPT_PHONE_NUMBER}), +]