Improve validations for quantity