Update validate codes error handling