Added validation to models