add errors for invalid data