Error prevention is an important value that gets often forgotten by un-experienced designer.
Preventing an error to happen is known as *Poka-Yoke *principle. The purpose of Poka-Yoke is to eliminate product defects by preventing, correcting, or drawing attention to human errors as they occur. The concept was formalized by Shigeo Shingo as part of the Toyota Production System. Originally described as baka-yoke, but as this means “fool-proofing” (or “idiot-proofing”) the name was changed to the milder poka-yoke.”
To prevent errors you need to mitigate and anticipate them. Placing constraints forces the user to adjust it's behavior in order to move forward with their intended action.
Prevent actions and disable elements
Forms are often seen as a default practice, but they are ideal for applying Poka-Yoke. Preventing an action to appear until all of the conditions necessary to perform that action are met is a great example. For instance, don’t allow to proceed with a registration form until all required fields are filled in. Disable submit button if input field is empty. Disable Delete all link if less than two items in the list are selected. Examples are endless.
If a user wants to order an accessorie from an fashion e-commerce, you can set 1 as the default value (instead of leaving the field empty that would trigger an error). Default settings are a great asset in error prevention
Not having to interrupt the user experience with known errors that can be autocorrect drastically improve the application's perception. For instance, the browser you are currently using can automatically add “http://” to an URL if you omitted it.
You can restrict user’s inputs allowing for instance only numeric characters, or disallowing special characters. This enhance the experience but error proofing the inputs. To improve even more the experience, the application my show an usage example to explain how to fill in the form or complete a designated task.
The important thing to always keep in mind is that whenever a mistake/error is detected, make sure you provide a clear explanation of why the process is stopped.