Log validation errors to the database for later inspection.