Added validations to models.