added validations to purchase model