added validations to the relationship model as well as tests