added validations at user and product model