Opinion by
Mr. Justice Sabler,The plaintiff, a resident of the State of Texas, and a dealer in vegetables, offered by telegram to sell the defendant a carload of tomatoes. A message was sent which read as follows: “Quote one carload — shed pack— all fancy — fine quality — two fifteen. Willis — 'one out tomorrow — same price — state inspection — bank guarantee —answer quick.” The defendant submitted a counter-proposition, naming a lower price, and this was accepted by telegraph. As a result, a car was consigned to Pittsburgh, but the contents were deemed unsatisfactory upon arrival, and were sold at a loss. This action was brought to recover the sum which defendant had agreed to pay. The affidavit of defense averred inferior quality of the product sent, and a resulting injury, and further claimed, as a set-off against the amount received from the sale in the open market, the damages resulting from a second purchase made under like terms.
Binding instructions were given for the plaintiff, after rejection of evidence offered by defendant to show the condition of the fruit when it arrived in Pittsburgh, to be followed by proof that the defects complained of-could not have arisen en route. The court below was of the opinion that this testimony was unavailing, in view of the approval of quality shown by certificate of the duly authorized official of the State of Texas, made in conformity with the laws of that commonwealth, and that such inspection eoulcknot be impeached in the *232absence of an offer to show fraud or misconduct. This appeal is based on the refusal to receive the evidence offered, both in defense of the claim for the purchase price of the first car, and in support of the counterclaim for loss occasioned by the second shipment, which had been paid for in full.
It is to be noted first, that the negotiations between the parties are evidenced alone by the telegrams which passed between them, and there is no contention by the appellant that the interpretation of the writings was other than a question for the court: Werner Saw Mill Co. v. Ferree, 201 Pa. 405. The contracts are based on the offer and acceptance at Willis, Texas, and the obligations of the parties thereunder are to be determined by the laws of that state (Ward Lumber Co. v. American L. & M. Co., 247 Pa. 267), and the legal effect of the inspection provided for must be thus fixed: Hettler Lumber Co. v. Olds, 221 Fed. 612. The agreement must be presumed to have been executed in view of the legislation there existing, controlling such transactions: Herdic v. Bilger, 47 Pa. 60. An examination discloses a statute, passed in 1917, regulating the inspection of vegetables, such as were here shipped, by duly appointed officers, who are authorized to give formal certificates of grade and quality. In the present case, such a statement, showing the first carload complied in all respects with the order given, was made, and duly offered in evidence.
It reads in part as follows: “This Certifies That the contents of Car ART No. 10905, loaded with Texas tomatoes grown or shipped by D. M. Field, have been inspected by a representative of the State Department of Agriculture, and the products therein found, at the time of loading, to be in conformity with the Texas State Legal Standards.” In connection therewith, it is to be observed the Texas statute provides: “All fruit for both fancy and choice grades must be sound and free from undesirable scars, cat faces and damages from insects and other causes.”
*233It is insisted, however, that the actual examination, when the tomatoes arrived, showed this to be incorrect, since the defects appearing were such as must have arisen while growing. And it is urged there is an implied warranty that the articles purchased were merchantable, which fact could not be determined until an actual inspection was made upon arrival at their destination. The vendee undoubtedly has the right, in the absence of a contract to the contrary, to examine his purchase to determine its fitness for use (35 Cyc. 225), whether the sale be made by sample (Pontiac Shoe Co. v. Hamilton (Tex.), 44 S. W. 405), or by description: 2 Williston on Contracts 1850. But where this power to inspect exists, and he neglects to exercise his privilege (Thomas v. Cohen, 275 Pa. 576), or by agreement or conduct waives the right, he cannot complain: Sloan Corp. v. Linton, 260 Pa. 569.
He may by contract provide the manner in which the examination shall be made, and, when he does so, is concluded by his stipulation. So, it may be agreed that the approval of some third party shall be deemed sufficient, and, when this is pronounced in good faith, the vendee will be bound by the decision given: Herdic v. Bilger, 47 Pa. 60; Lucas Coal Co. v. D. & H. Canal Co., 148 Pa. 227; Gorham v. D. C. & S. W. Ry. Co. (Tex.), 107 S. W. 930; Hettler Lumber Co. v. Olds, 221 Fed. 612; Texas Star Flouring Mills Co. v. Moore, 177 Fed. 744. “It is a well established rule that where parties to a contract of sale agree that the quality of the thing sold shall be determined by an inspection to be made by a particular person, or a person holding a particular position, such determination is conclusive upon the parties, and cannot be impeached, except for fraud, collusion or palpably arbitrary action”: Dickson v. Darnell (Wash.), 167 Pac. 937, 940. And it is frequently provided in such agreements that examination shall be made by some public inspector officially designated, or by an official named by a board of trade of a city where the contract is to be per*234formed: Nofsinger v. Ring, 71 Mo. 149; Brooke v. Laurens Milling Co., 78 S. C. 200, 58 S. E. 806; Tacoma & Eastern Lumber Co. v. Field & Co. (Wash.), 170 Pac. 360; Citizens’ I. M. & E. Co. v. Perkins (Ok.), 152 Pac. 443.
“The object of inspection laws is to protect the community, so far as they apply to domestic sales, from frauds and impositions; and, in relation to articles designed for exportation, to preserve the character and reputation of the state in foreign markets. They are also incidentally designed to protect manufacturers and vendors themselves against unfounded and unjust claims of vendees and consumers”: 22 Cyc. 1364. With these purposes in view, the legislation was passed in Texas, governing the standards of tomato packs within its jurisdiction, and a duly appointed officer was directed to exercise the proper supervision, and issue an official certificate showing the true state of facts. There can be no doubt that it was this investigation which was referred to in the telegrams between the parties in the present case. To hold otherwise, would render meaningless the condition appearing therein of “state inspection.” This was made, and the certificate, offered upon the trial, showed the goods at the place of loading conformed to the offer accepted. In the absence of some proof that the inspector acted fraudulently, or in collusion with the vendor, his approval was correctly treated as conclusive, and the court properly refused to permit evidence to show that the tomatoes were not as described when received at Pittsburgh. This disposes of the first four assignments of error, all of which are overruled.
The defendant set up a counterclaim based upon his alleged loss on the second carload, which he purchased June 9, 1920, and paid for. That such set-off may be had and the claim allowed, if properly proven, is not questioned: Phillips v. Lawrence, 6 W. & S. 150; 35 Cyc. 443. Here, again, we find, in the telegraphic correspond-*235en.ce, provision for state inspection at the place of loading.
No evidence was offered of the grant of an official certificate showing compliance with the terms of the shipping order in the case of this car, but there was no necessity for plaintiff to establish the fact. If the defendant desired to take advantage of an absence of such approval, the burden was upon it to so prove, if its counterclaim was to be sustained. The affirmative rested upon it to make out the demand insisted upon, and having failed to either aver, in its affidavit of defense, or to prove on the trial, that there was no “state inspection,” the evidence to show the condition of the goods upon arrival at Pittsburgh was properly rejected, and the fifth assignment of error is overruled.
The judgment is affirmed.