From d02c725d5d5a6bbeb42cf703a4ac2116e2c45f2d Mon Sep 17 00:00:00 2001 From: Bobby Date: Sun, 27 Nov 2022 15:44:43 -0500 Subject: added guid validator --- docs/built-in/index.rst | 18 ++ docs/built-in/zip_locales.rst | 717 ------------------------------------------ 2 files changed, 18 insertions(+), 717 deletions(-) delete mode 100644 docs/built-in/zip_locales.rst (limited to 'docs') diff --git a/docs/built-in/index.rst b/docs/built-in/index.rst index e28e515..91b5d4e 100644 --- a/docs/built-in/index.rst +++ b/docs/built-in/index.rst @@ -944,3 +944,21 @@ By default, the ``zip`` function matches ZIP codes for "US". Here's an example o zip('123456', locale='IN') # returns True If you supply an Invalid or empty value in the ``locale`` argument, the function will raise a ``ValueError`` exception. Similarly, if you supply another data type in the ``locale`` argument, the function will raise a ``TypeError`` exception. + + +guid(guid: str) +--------------- + +The ``guid`` function validates a GUID (Globally Unique Identifier) string. The function returns ``True`` if the string is a valid GUID, and ``False`` otherwise. + +Here's an example of how to use the ``guid`` function: + +.. code-block:: python + from edify.library import guid + + guid('6ba7b810-9dad-11d1-80b4-00c04fd430c8') # returns True + guid('{51d52cf1-83c9-4f02-b117-703ecb728b74}') # returns True + guid('{51d52cf1-83c9-4f02-b117-703ecb728-b74}') # returns False + + + diff --git a/docs/built-in/zip_locales.rst b/docs/built-in/zip_locales.rst deleted file mode 100644 index 92670b1..0000000 --- a/docs/built-in/zip_locales.rst +++ /dev/null @@ -1,717 +0,0 @@ -.. list-table:: - :header-rows: 1 - - * - Country - - Locale - - * - Afghanistan - - AF - - * - Albania - - AL - - * - Algeria - - DZ - - * - American Samoa - - AS - - * - Andorra - - AD - - * - Angola - - AO - - * - Anguilla - - AI - - * - Antigua and Barbuda - - AG - - * - Argentina - - AR - - * - Armenia - - AM - - * - Aruba - - AW - - * - Australia - - AU - - * - Austria - - AT - - * - Azerbaijan - - AZ - - * - Bahamas - - BS - - * - Bahrain - - BH - - * - Bangladesh - - BD - - * - Barbados - - BB - - * - Belarus - - BY - - * - Belgium - - BE - - * - Belize - - BZ - - * - Benin - - BJ - - * - Bermuda - - BM - - * - Bhutan - - BT - - * - Bolivia - - BO - - * - Bonaire - - BQ - - * - Bosnia and Herzegovina - - BA - - * - Botswana - - BW - - * - Brazil - - BR - - * - Brunei - - BN - - * - Bulgaria - - BG - - * - Burkina Faso - - BF - - * - Burundi - - BI - - * - Cambodia - - KH - - * - Cameroon - - CM - - * - Canada - - CA - - * - Canary Islands - - CI - - * - Cape Verde - - CV - - * - Cayman Islands - - KY - - * - Central African Republic - - CF - - * - Chad - - TD - - * - Channel Islands - - CI - - * - Chile - - CL - - * - China, People's Republic - - CN - - * - Colombia - - CO - - * - Comoros - - KM - - * - Congo - - CG - - * - Congo, The Democratic Republic of - - CD - - * - Cook Islands - - CK - - * - Costa Rica - - CR - - * - Côte d'Ivoire - - CI - - * - Croatia - - HR - - * - Cuba - - CU - - * - Curacao - - CW - - * - Cyprus - - CY - - * - Czech Republic - - CZ - - * - Denmark - - DK - - * - Djibouti - - DJ - - * - Dominica - - DM - - * - Dominican Republic - - DO - - * - East Timor - - TL - - * - Ecuador - - EC - - * - Egypt - - EG - - * - El Salvador - - SV - - * - Eritrea - - ER - - * - Estonia - - EE - - * - Ethiopia - - ET - - * - Falkland Islands - - FK - - * - Faroe Islands - - FO - - * - Fiji - - FJ - - * - Finland - - FI - - * - France - - FR - - * - French Polynesia - - PF - - * - Gabon - - GA - - * - Gambia - - GM - - * - Georgia - - GE - - * - Germany - - DE - - * - Ghana - - GH - - * - Gibraltar - - GI - - * - Greece - - GR - - * - Greenland - - GL - - * - Grenada - - GD - - * - Guadeloupe - - GP - - * - Guam - - GU - - * - Guatemala - - GT - - * - Guernsey - - GG - - * - Guinea-Bissau - - GW - - * - Guinea-Equatorial - - GQ - - * - Guinea Republic - - GN - - * - Guyana (British) - - GY - - * - Guyana (French) - - GF - - * - Haiti - - HT - - * - Honduras - - HN - - * - Hong Kong - - HK - - * - Hungary - - HU - - * - Iceland - - IS - - * - India - - IN - - * - Indonesia - - ID - - * - Iran - - IR - - * - Iraq - - IQ - - * - Ireland, Republic of - - IE - - * - Islas Malvinas - - FK - - * - Israel - - IL - - * - Italy - - IT - - * - Ivory Coast - - CI - - * - Jamaica - - JM - - * - Japan - - JP - - * - Jersey - - JE - - * - Jordan - - JO - - * - Kazakhstan - - KZ - - * - Kenya - - KE - - * - Kiribati - - KI - - * - Korea, Republic of - - KR - - * - Korea, The D.P.R of - - KP - - * - Kosovo - - XK - - * - Kuwait - - KW - - * - Kyrgyzstan - - KG - - * - Laos - - LA - - * - Latvia - - LV - - * - Lebanon - - LB - - * - Lesotho - - LS - - * - Liberia - - LR - - * - Libya - - LY - - * - Liechtenstein - - LI - - * - Lithuania - - LT - - * - Luxembourg - - LU - - * - Macau - - MO - - * - Macedonia, Republic of - - MK - - * - Madagascar - - MG - - * - Malawi - - MW - - * - Malaysia - - MY - - * - Maldives - - MV - - * - Mali - - ML - - * - Malta - - MT - - * - Marshall Islands - - MH - - * - Martinique - - MQ - - * - Mauritania - - MR - - * - Mauritius - - MU - - * - Mayotte - - YT - - * - Mexico - - MX - - * - Moldova, Republic of - - MD - - * - Monaco - - MC - - * - Mongolia - - MN - - * - Montenegro - - ME - - * - Montserrat - - MS - - * - Morocco - - MA - - * - Mozambique - - MZ - - * - Myanmar - - MM - - * - Namibia - - NA - - * - Nauru - - NR - - * - Nepal - - NP - - * - Netherlands - - NL - - * - New Caledonia - - NC - - * - New Zealand - - NZ - - * - Nicaragua - - NI - - * - Niger - - NE - - * - Nigeria - - NG - - * - Niue - - NU - - * - Northern Mariana Islands - - MP - - * - Norway - - NO - - * - Oman - - OM - - * - Pakistan - - PK - - * - Palau - - PW - - * - Panama - - PA - - * - Papua New Guinea - - PG - - * - Paraguay - - PY - - * - Peru - - PE - - * - Philippines - - PH - - * - Poland - - PL - - * - Portugal - - PT - - * - Puerto Rico - - PR - - * - Qatar - - QA - - * - Réunion - - RE - - * - Romania - - RO - - * - Russian Federation - - RU - - * - Rwanda - - RW - - * - Saipan - - MP - - * - Samoa - - WS - - * - Sao Tome and Principe - - ST - - * - Saudi Arabia - - SA - - * - Senegal - - SN - - * - Serbia - - RS - - * - Seychelles - - SC - - * - Sierra Leone - - SL - - * - Singapore - - SG - - * - Slovakia - - SK - - * - Slovenia - - SI - - * - Solomon Islands - - SB - - * - Somalia - - SO - - * - South Africa - - ZA - - * - South Sudan - - SS - - * - Spain - - ES - - * - Sri Lanka - - LK - - * - St. Barthélemy - - BL - - * - St. Croix - - VI - - * - St. Eustatius - - SE - - * - St. Helena - - SH - - * - St. John - - AG - - * - St. Kitts and Nevis - - KN - - * - St. Lucia - - LC - - * - St. Maarten - - SX - - * - St. Thomas - - VI - - * - St. Vincent and the Grenadines - - VC - - * - Sudan - - SD - - * - Suriname - - SR - - * - Swaziland - - SZ - - * - Sweden - - SE - - * - Switzerland - - CH - - * - Syria - - SY - - * - Tahiti - - PF - - * - Taiwan - - TW - - * - Tanzania - - TZ - - * - Thailand - - TH - - * - Togo - - TG - - * - Tonga - - TO - - * - Tortola - - VG - - * - Trinidad and Tobago - - TT - - * - Tunisia - - TN - - * - Turkey - - TR - - * - Turkmenistan - - TM - - * - Turks and Caicos Islands - - TC - - * - Tuvalu - - TV - - * - Uganda - - UG - - * - Ukraine - - UA - - * - United Arab Emirates - - AE - - * - United Kingdom - - GB - - * - United States of America - - US - - * - Uruguay - - UY - - * - Uzbekistan - - UZ - - * - Vanuatu - - VU - - * - Venezuela - - VE - - * - Vietnam - - VN - - * - Virgin Islands (British) - - VG - - * - Virgin Islands (US) - - VI - - * - Yemen - - YE - - * - Zambia - - ZM - - * - Zimbabwe - - ZW - \ No newline at end of file -- cgit v1.2.3