quantity validation