parse, don't validate
phrase
- Converting untrusted input into a precise type once at the boundary, instead of re-checking raw values throughout the code. Parse a string into an EmailAddress type at the API boundary; downstream code never sees raw strings.
In plain words
- checking the same input everywhere
- validation scattered all over the code
- check it once at the edge