Skip to content

Commit f11f06b

Browse files
alexkwolfeclaude
andcommitted
Clarify phone type validation limitations and international support
- Added Important Limitation section explaining that valid only checks area code/exchange - Clarified that the line portion (last 4 digits) is not verified for connectivity - Recommended third-party services (Trestle, Telesign, BriteVerify) for deliverability - Corrected international number handling - they return valid: false, not parsed - Added "What It Does NOT Verify" section listing connectivity limitations - Updated geographic limitation to be clearer about international numbers 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 898caec commit f11f06b

File tree

1 file changed

+37
-6
lines changed

1 file changed

+37
-6
lines changed

Reference.md

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,24 @@ Parses numeric values from strings, handling currency symbols and thousands sepa
547547

548548
### Phone Type
549549

550-
Comprehensive phone number parsing for US/Canada numbers with component extraction.
550+
Comprehensive phone number parsing and validation for US/Canada numbers with real-world verification.
551+
552+
**Geographic Limitation**: Currently only supports US and Canadian phone numbers. International numbers from other countries will be marked as invalid (valid: false) and will not parse correctly, even if they have a valid format in their home country.
553+
554+
**Advanced Validation**: The `valid` property indicates more than just format correctness - it verifies:
555+
- The area code is a real, assigned area code
556+
- The exchange is a real exchange within that area code
557+
- The area code and exchange legitimately belong together
558+
- The number follows valid North American Numbering Plan rules
559+
560+
This means a phone number like "(999) 555-1234" would be invalid even though the format is correct, because 999 is not a real area code.
561+
562+
**What It Does NOT Verify**: The validation does NOT check if:
563+
- The complete 10-digit number is actually connected/in service
564+
- The line (last 4 digits) is valid for that area code and exchange
565+
- The number can receive calls or texts
566+
567+
A number can pass type validation but still be disconnected or undeliverable.
551568

552569
**Components:**
553570
- Raw: Unmodified value
@@ -572,11 +589,15 @@ Comprehensive phone number parsing for US/Canada numbers with component extracti
572589

573590
**Examples:**
574591
```
575-
US Standard:
592+
Valid US Numbers (real area codes and exchanges):
576593
"(512) 789-1111" → area: "512", exchange: "789", line: "1111"
577594
"512-789-1111" → "5127891111"
578595
"512.789.1111" → "5127891111"
579596
597+
Invalid Despite Good Format (fake area code):
598+
"(999) 555-1234" → valid: false (999 not a real area code)
599+
"(123) 456-7890" → valid: false (123 not a real area code)
600+
580601
With Extensions:
581602
"5127891111x123" → extension: "123"
582603
"5127891111 x 43" → extension: "43"
@@ -593,12 +614,17 @@ Masked Numbers:
593614
"1-(512) *** ****" → valid: true (masked)
594615
"**********" → valid: true (fully masked)
595616
596-
International:
597-
"+49 30 22610" → country_code: "DE" (Germany)
598-
"+44 1484 519892" → country_code: "GB" (UK)
617+
International (will NOT parse correctly):
618+
"+49 30 22610" → valid: false (not US/Canadian format)
619+
"+44 1484 519892" → valid: false (not US/Canadian format)
620+
Note: International numbers are not supported unless they coincidentally match US/Canadian patterns
599621
```
600622

601-
**Invalid inputs** (valid=false): `"donkey kong"`, `"964523331"` (too short)
623+
**Invalid inputs** (valid=false):
624+
- `"donkey kong"` (not a number)
625+
- `"964523331"` (too short)
626+
- `"(999) 555-1234"` (invalid area code)
627+
- `"(512) 999-1111"` (invalid exchange for 512 area code)
602628

603629
**Field Examples:** Phone 1, Phone 2, Mobile Phone, Work Phone
604630

@@ -608,6 +634,8 @@ International:
608634
- Format for display: `{{Phone 1 > Area}}-{{Phone 1 > Exchange}}-{{Phone 1 > Line}}`
609635
- Check validity: `Phone 1 > Valid is true`
610636

637+
**Important Limitation**: The `valid` property only confirms the area code and exchange are legitimate - it does NOT verify the full number is connected or deliverable. The "line" portion (last 4 digits) could still be invalid or disconnected. For true deliverability verification, use third-party Add-On services like Trestle, Telesign, or BriteVerify in a flow step to collect carrier-level metadata, then evaluate the appended data in a subsequent filter step to block disconnected numbers.
638+
611639
---
612640

613641
### Postal Code Type
@@ -1138,6 +1166,9 @@ This ensures sensitive data can be used for processing (validation, delivery to
11381166
- Normalizes to lowercase
11391167

11401168
**Phone**:
1169+
- Validates actual area codes and exchanges (not just format)
1170+
- Verifies area code/exchange combinations are real
1171+
- Only supports US/Canadian numbers currently
11411172
- Supports type hints (h=home, w=work, m=mobile)
11421173
- Detects toll-free numbers
11431174
- Handles extensions

0 commit comments

Comments
 (0)