Skip to content

[codex] validate phone contact methods - #203

Draft
doobneek wants to merge 1 commit into
developfrom
codex/phone-contact-validation
Draft

[codex] validate phone contact methods#203
doobneek wants to merge 1 commit into
developfrom
codex/phone-contact-validation

Conversation

@doobneek

@doobneek doobneek commented May 4, 2026

Copy link
Copy Markdown

Summary

  • normalize saved phone numbers to digits only while accepting common punctuation and a leading US country code
  • allow short 3-10 digit phone/SMS/fax numbers, including emergency and text short codes
  • require WhatsApp numbers to be full 10-digit US numbers and reject extensions on SMS, WhatsApp, and fax contacts
  • add focused phone utility tests and let unit-only test runs skip the DB integration setup

Validation

  • npx eslint src/utils/phones.js src/controllers/locations.js test/unit/phones.test.js test/setup.js
  • npx jest test/unit/phones.test.js --runInBand
  • npm run build

Note: the normal pre-commit hook runs full-repo lint, which still fails on existing CRLF line-ending issues outside this patch. Touched-file lint passes.

Part of the phone contact-method work alongside streetlives/yourpeer.nyc#579.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant