I believe that he did violate the law against a private person conducting foreign policy.
He has committed the entire state of CA to it as well, as the state Governor.