Adds wrapper error classes in case of failed validation.