correct validation error handling