
140 N.W.2d 921 (1966)
Stanley C. NELSON and Clinton J. Erickson, and Council Bluffs Farm Equipment, Inc., a corporation, Appellants,
v.
Gerald A. LEADERS, Appellee.
No. 51930.
Supreme Court of Iowa.
March 8, 1966.
*922 John W. Kellogg and Fred E. Egan, Missouri Valley, for appellants.
Hess, Peters & Sulhoff, Council Bluffs, and Michael Murray, Logan, for appellee.
THORNTON, Justice.
This is an action to enforce a restrictive covenant in a buy and sell agreement between stockholders in a farm equipment business holding an International Harvester dealership doing business in Council Bluffs. Plaintiffs are the remaining stockholders and the corporation. Defendant was employed by the individual plaintiffs in 1959 while they were partners in the farm equipment business. Defendant later became a partner in the business. In June, 1961, they incorporated as Council Bluffs Farm Equipment, Inc. Each individual plaintiff had 540 shares of stock and defendant 120 shares of stock in the corporation. They were the only stockholders. Defendant subsequently acquired 320 shares.
The parties entered into a buy and sell agreement in July of 1961, the pertinent part thereof is:
"5. In the event any of the undersigned stockholders shall cease to be an officer or director of said corporation it is agreed that said stockholder shall not engage in a similar business for a period of ten years from the date of such termination as officer or director, within a radius of 40 miles from Council Bluffs, Iowa, either directly or indirectly or on his own account, or as partner, stockholder, employee or otherwise."
Defendant entered into an agreement with plaintiffs wherein he resigned as an officer, director and employee, sold his stock to plaintiffs, and wherein it was provided:
"6. Except as to the provision in the buy and sell agreement against competing, which shall continue as provided therein, each of the parties hereby releases the other, * * *."
Defendant then became a partner with his brother in the farm equipment business in Dunlap, Iowa, approximately 50 highway miles and 45 air miles from Council Bluffs. This is also an International Harvester dealership.
Plaintiffs' prayer is that defendant be enjoined from selling, offering for sale, quoting prices, soliciting orders, picking up and delivering farm equipment, parts or repair items, from advertising or otherwise engaging in the farm equipment business or competing either directly or indirectly within a distance of 40 miles of Council Bluffs.
The trial court ordered defendant to refrain from engaging in business within the 40-miles radius of Council Bluffs by any *923 systematic or continuous solicitation and further decreed:
"* * * the defendant shall be entitled to sell farm equipment to any and all customers from within the forty-mile radius who come to his place of business, and that the defendant may go to the customer's residence, even though the same may be within the forty-mile radius for the purpose of appraising farm equipment which is to be used as a trade-in on the purchase of other equipment from the defendant's place of business at Dunlap, Iowa.
"The defendant may also deliver machinery and pick up machinery within the forty mile radius if said delivery and pickup is incident to a sale as a result of the customer coming to the defendant's place of business. In the event of warranty upon any equipment sold to customers from within the forty-mile radius, the defendant may service said equipment pursuant to said warranty."
Both parties appeal. Plaintiffs contend they are entitled to an injunction as prayed. Defendant, that the restrictive covenant be declared void as against public policy because the 40-mile radius is unreasonable as being in excess of the area necessary for the protection of plaintiffs, or that the trial court be affirmed.
I. The first proposition to be determined arises on defendant's cross appeal wherein he attacks the validity of the contract as against public policy. Defendant did not plead such defense in the trial court. He merely denied pertinent allegations in the petition. He did, however, urge such matters in his motion to dismiss. He offered evidence, without objection as far as the record shows, to show the 40-mile radius was unreasonable. This same evidence shows plaintiffs were not damaged nor would they be if defendant continued selling to persons in the 40-mile radius as he had been. The trial court considered defendant's contention the contract was unreasonable and rejected it.
Plaintiffs urge here defendant is not entitled to raise such defense because he did not plead it and defendant has the burden of so pleading and proving. Plaintiffs rely on our decision in Cogley Clinic v. Martini, 253 Iowa 541, 550, 112 N.W.2d 678, 682. In Cogley, an action to enforce a similar agreement against a medical partner, we said:
"The burden of proof that a contract is contrary to public policy is upon him who asserts it. Larsen v. Burroughs, supra. [224 Iowa 740, 277 N.W. 463.] Defendant has failed to prove any violation of public policy."
This was a departure from our prior decisions. See the dissent in Cogley, pages 551, 552 of 253 Iowa, pages 683, 684 of 112 N.W.2d, where the late Justice Hays points out this change and disagrees with it.
Defendant in argument recognizes the statement above quoted from Cogley but states, "* * * the defendant's attack here is upon the failure of the plaintiff to sustain the burden of proving the reasonableness of the covenant, This rule has not been changed by the decision in Cogley."
That this position of the defendant is untenable is made clear by Justice Hays' discussion of the problem in his dissent in Cogley, wherein he states the effect of the majority opinion as follows:
"In effect, it says such covenants are per se valid with the burden being upon the defendant to show illegality, i. e., unreasonableness, as reasonable or unreasonable is the yardstick by which the legality is to be determined." See also Annotation, 43 A.L. R.2d 116 et seq.
We have held where evidence is introduced to prove an unpleaded issue and the other party does not object to it the issue is tried by consent. Wilson v. Corbin, 241 Iowa 593, 605, 41 N.W.2d 702, 709; Reed v. Harvey, 253 Iowa 10, 13, 110 N.W. 2d 442; Federated Mutual Implement and Hardware Insurance Company v. Erickson, *924 252 Iowa 1208, 110 N.W.2d 264; and Verlinden v. Godberson, 238 Iowa 161, 166, 25 N.W.2d 347, 350. In the Federated Mutual case there was a failure to file a reply. In the other three an issue was not raised by the petition and in each case it is pointed out there was a failure to raise the question of the sufficiency of the petition before going to trial. Defendant does not urge this proposition here and it is therefore waived. Rule 344(a) (4) (Third), Rules of Civil Procedure.
We think under this record defendant is not entitled to urge the invalidity of the restrictive covenant as a defense because he has failed to plead it in conformity with rules 72, 101 and 103, Rules of Civil Procedure. McCarty, Iowa Pleading, Vol. 1, section 143, page 119.
II. The evidence in this case shows defendant advertised in the Council Bluffs newspaper and that he had agreed to discontinue this practice at a conference with plaintiffs prior to the commencement of this action and there is no evidence he has resumed so advertising. Defendant has made nine sales to persons within the 40-mile radius, but none of these persons have been solicited by defendant or his firm. In one instance the customer contacted defendant while he was still living in Council Bluffs. (He moved his home to Dunlap at the close of the school year in 1963.) All of the others contacted defendant at his place of business in Dunlap. These customers lived from five to 30 miles from Council Bluffs. There is evidence of one person being solicited by one of defendant's salesmen. This did not result in a sale.
Plaintiffs did not offer any evidence of the extent of their actual business operation within the 40-mile radius. Defendant's evidence showed plaintiffs' operation was very limited to the north and northeast of Council Bluffs and was generally south of U. S. Highway No. 6 to the extent of 25 miles. The individual plaintiffs had interests in the dealerships in Neola 18 miles northeast of Council Bluffs and Missouri Valley 23 miles north of Council Bluffs and this was the reason for so limiting plaintiffs' operation. There is no evidence plaintiffs did in fact do any business as far north and east as Missouri Valley and Neola.
Logan is eight miles northeast of Missouri Valley on U. S. Highway No. 30. There is another International Harvester dealer there. Dunlap is 18 miles northeast of Logan on U. S. Highway No. 30. There are also International Harvester dealers at Oakland, Avoca and Shelby within the 40-mile radius to the east and north. There is no evidence plaintiffs at any time contemplated expanding their operation to the northeast.
The burden is on plaintiffs to establish the invasion or threatened invasion of a right and a substantial injury will result or such injury is reasonably to be apprehended. Cogley Clinic v. Martini, 253 Iowa 541, 549, 112 N.W.2d 678; and Schmitt v. Kirkpatrick, 245 Iowa 971, 63 N.W.2d 228.
The only suggestion of injury to plaintiffs is solicitation by newspaper or otherwise in the immediate area of Council Bluffs. This the trial court has ordered defendant not to do. Under the record made plaintiffs are not entitled to more relief than granted by the trial court.
The decree of the trial court finds support in Haldeman v. Simonton, 55 Iowa 144, 7 N.W. 493; Raub v. Van Horn, 133 Pa. 573, 19 A. 704; and Midland Lumber & Coal Co. v. Roessler, 203 Wis. 129, 233 N.W. 614.
As in the trial court, the costs are taxed one-half to plaintiffs and one-half to defendant.
Affirmed.
All Justices concur.
