added from and to validation to relation clas