{
  "id": 14929683,
  "title": "One optional phone number, eleven files, five kinds of empty, and no migration",
  "url": "https://urgent.news/2026/10/16/one-optional-phone-number-eleven-files-five-kinds-of-empty-and-no",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-16T10:31:43.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/daniel_pertu/one-optional-phone-number-eleven-files-five-kinds-of-empty-and-no-migration-hi6"
  },
  "original_language": "en",
  "account": "Nakodo, an app that introduces creators and businesses to brands, now allows the addition of an optional phone number alongside an address. This feature is introduced through an email, with the brand having the option to include a phone number when they provide an address. The phone number field is made up of eleven files in the commit, with no migration or ALTER TABLE required. The database schema change is a single line in a TypeScript type, as the field is optional and can be null.\n\nThe validation of phone numbers is a crucial aspect of this feature, as it helps ensure that the entered numbers are plausible. The validation process involves two regexes: one for checking the characters (like digits, spaces, brackets, dots, and hyphens) and another for counting the digits to ensure the number falls within the valid range. The rules for accepting a phone number are that it should be plausible and left as written by the brand. Thus, accepted formats include +44 7700 900123, (020) 7946 0018, and 02079460018, while rejecting invalid representations like call the office or ext 4.\n\nThe empty field has five different representations: an empty string in the editor, an empty string in the stored jsonb, null in the thread context, a sentence in the read view, and a required prop on the summary card. Each representation of empty serves a specific purpose, with the aim of maintaining clarity and ensuring the absence of a phone number is handled appropriately.",
  "summary": "Yesterday I added an optional phone number to Nakodo. When a creator or a business says yes to a brand, the app introduces them by email, and the brand can now add a number to go with the address. One field, one afternoon, eleven files in the commit, and a good example of where the work in a small feature actually goes. The database part: nothing A campaign's outreach settings are a jsonb column…",
  "key_points": [
    "Nakodo app adds optional phone number feature",
    "Phone number field consists of eleven files in commit",
    "Database schema change requires single TypeScript line"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}