Validation of quantity field finally done