Improved example code in README.md
Refactored validation errors to interface and struct