move validator to abstractrepository