Good design prevents users from making errors in the first place. This involves eliminating error-prone conditions, asking for confirmation of destructive actions, and providing constraints that guide users toward correct choices.
Do
Validate inputs in real-time as users type
Ask for confirmation before destructive actions
Provide clear constraints and formatting examples
Disable buttons that would cause errors
Avoid
Wait until form submission to show validation errors
Allow destructive actions without warning
Accept clearly invalid input without guidance
Make it easy to accidentally trigger critical actions