improve validation provider and add getErrors() method
formatting
Merge pull request #1515 from craigh/validationProviderImprovement

improve validation provider and add getErrors() method