added validation to product model