error handler for validation