added quantity range validation