adding some validations to model relations