Moved the validation error handler to app level.