Watch
Error prevention 0:47
A 47-second explainer of Error prevention, narrated over the same demo you can try yourself.
Try the interactive Error prevention demo
What this video covers
Error prevention is designing so a mistake can't happen in the first place - constraints, sensible defaults, disabling impossible actions, formats that can't be entered wrong - rather than letting the slip occur and catching it with a message afterwards. The best error is the one the interface made impossible to make.
Preventing it, you simply couldn't go wrong - the control wouldn't let you exceed the stock or type nonsense, so there was no error to fix. Catching it, you did the work, hit submit, and only then got told off. Same goal; one path made the mistake impossible, the other waited to scold you for it.