All recipes

Recipes

Validate form input

Normalise an email, format a phone number to E.164, validate an IBAN, and slugify a name before you store the record.

Step 1 of 4

Normalise the email

Run the address through the email normalizer to strip plus-tags and drop Gmail dots, so two spellings of the same inbox collapse into one. Do this before you store or dedupe — user+promo@gmail.com and user@gmail.com are the same mailbox, and storing both lets one person register twice.