Glossary / Defensive input
Defensive input: what it means
Treating everything that comes in, typed or imported, as possibly wrong and checking it before use.
How it shows up when you build
- When things go wrong: Treating everything that comes in, typed or imported, as possibly wrong and checking it before use.
A tip
- Parse first, replace later. Only swap in imported data after it passed every check.
Practise it
Build it with an AI tool and check the result in these exercises:
- 7. When things go wrong (Empty and error states)