normalize error, and test validation