§823. Labor organizations; contracts in restraint of membership contrary to public policy
Every undertaking or promise made, whether written or oral, express or implied, constituting or contained in any arrangement or proposed arrangement of hiring or employment, whether for a definite term or terminable at the will of either of the parties thereto, whereby:
(1) Either party thereto undertakes or promises to join or to remain a member of some specific labor organization or organizations or to join or remain a member of some specific employer organization or any employer organization or organizations; or
(2) Either party thereto undertakes or promises not to join or not to remain a member of some specific labor organization or any labor organization or organizations, or of some specific employer organization or any employer organization or organizations; or
(3) Either party thereto undertakes or promises that he will withdraw from an employment relation in the event that he joins or remains a member of some specific labor organization or any labor organization or organizations, or of some specific employer organization or any employer organization or organizations;
is declared to be contrary to public policy and shall not afford any basis for the granting of legal or equitable relief by any court against a party to such undertaking or promise, or against any other person who may advise, urge, or induce, without fraud, violence, or threat thereof, either party thereto to act in disregard of such undertaking or promise.