No formal law, but that doesn’t mean the GOP can’t drive him out of any Party function or position for going back on his pledge.
They need one! Though such laws have never “ constitutionally” validated!