If any part of this chapter shall, for any reason, be adjudged by a court of competent jurisdiction to be invalid, or invalid as applied to a class of cases, such judgment shall not affect, impair, or invalidate the remainder thereof, and shall be confined in its operation to the part thereof directly involved in the controversy in which such judgment shall have been rendered.