correctly validate invitations