added the onError validation for the new schema
Merge pull request #3 from Orlando80/master

added the onError validation for the new schema