refactor dispatch quantity validation on dispatch