fix scope of error handler on validate