add validation to relation model