In this case a demurrer was interposed to the complaint on the ground of insufficient statement of facts. It was sustained, and plaintiff declined to amend. Judgment was thereupon entered, and plaintiff appeals.
The complaint in substance states that theretofore defendant and one Challis carried on a retail butcher business in Santa Ana and the city of Orange, which cities are about three and one-half miles apart. They had shops in these cities and run wagons distributing and selling meat in the vicinity. April 18,1892, plaintiff purchased their shops, implements, wagons, fixtures, and stock for four thousand six hundred and fifty dollars paid to them, and at the same time bought the goodwill of the business, for which he paid the further consideration of six hundred dollars, and defendant and Challis at the same time, in consideration of such purchase, each for himself, agreed with the plaintiff that he would not at any time thereafter and within the period of three years from said eighteenth day of April, *2981892, engage, directly or indirectly, or concern himself in carrying on or conducting a butcher business in said city of Santa Ana or within a radius of five miles from Said city.
Plaintiff has ever since continued to conduct said business at the towns of Santa Ana and Orange.
On the nineteenth day of September, 1892, defendant set up a retail butcher business in the city of Santa Ana, which he has since continued to conduct at that place, to the damage of plaintiff in the sum of five hundred dollars, for which sum he asks for judgment, and that defendant be enjoined.
The principal point made on the demurrer is, that the agreement sued on is void because in restraint of trade, and not in accordance with section 1674 of the Civil Code, which only authorizes one selling the goodwill of his business to agree to refrain from doing business “so long as the buyer or any person deriving title to the goodwill from him carries on a like business therein.”
Here the purchaser is, as a matter of fact, still carrying on the business purchased, but it is not so limited in the contract. In form defendant agreed not to carry on the business for three years, non constat that plaintiff or his assignee may do business there for three years, therefore defendant bound himself for a period which may extend beyond the period for which he was authorized to bind himself to refrain; therefore the contract is wholly illegal and void.
Section 1673 of the Civil Code reads as follows:
“Every contract by which anyone is restrained from exercising a lawful profession, trade, or business of any kind, otherwise than is provided by the next two sections is to that extent void.”
Section 1674 is as follows:
“ One who sells the goodwill of a business may agree with the buyer to refrain from carrying on a similar business within a specified county, city, or a part thereof, so long as the buyer, or any person deriving title to the goodwill from him, carries on a like business therein.”
*299The contracts which are here declared void are not declared unlawful. Certain contracts not made in a certain mode are declared void by the statute of frauds, but they are not therefore illegal.
This contract is not against public policy. At common law such a contract would have been valid. A contract restraining one from following a lawful trade or calling at all is invalid because it discourages trade and commerce, and prevents the party from earning a living, but the right to agree to refrain from his calling, within reasonable limits as to space, may have the contrary effect. It encourages trade, for it gives value to a custom or business built up by making it vendible. One would have an inducement, therefore, to serve the public honestly and efficiently, for he is not only profiting by the business, but the custom attracted by so doing is valuable even after he is ready to retire from business. And, besides, the rule enables him to find a purchaser who will also have an interest in so serving the public.
The period of the restraint is not unreasonable. While it has been said that a restraint of this character, independently of any statute upon the subject, is binding, even if the party in whose interests the restraint was imposed has retired from business and has no assignee, still, in such case, only nominal damages could be recovered.
The statute does not provide that such contracts, though not in accordance with the code, shall be wholly void. It says they shall be “to that extent void.” It may be said, and perhaps that is the correct construction, that the restraint which is other than that prescribed shall be void. But it is a familiar rule of law that where there is a statute upon a certain subject it enters into and becomes a part of such contract upon such subject, if the contract can be so construed. The contracting parties are presumed to have had the law in view. Sometimes the terms of the contract will rebut this presumption, but in the 'present case it does not.
*300One rule at common law applicable to this matter was that the restraint shall be no greater than is necessary to protect the purchaser. This rule would limit the restraint to the time during which the purchaser or his assignee is in business, for beyond that time there is nothing to protect.
As at common law the restraint as to time was not objectionable, this question does not arise. The question as to space was a very different affair. The court could not hold such a contract valid for a reasonable extent of country, and void as to the excess. To what part of the specified country would the court confine the business? If the described space were the state of California, to what city or town within the state should the operation of the contract be confined? To confine it to any part would be to make a new contract.
The courts have generally done this, however, when the circumstances permitted. Upon this point Baines v. Geary, 35 L. B. Ch. 154, is very instructive. The plaintiff -was engaged in the business of selling milk, and the defendant engaged as an employee as milk carrier, and agreed that “ he will not either during such service, or after being discharged or quitting such service, serve or cause to be served with milk or any other dairy produce for his own benefit or that of any other person or persons, .... any of the customers served or belonging at any time to the said Clement Baines, his successors or assigns.”
Action for injunction, Judge North said: “It is quite clear that a covenant in restraint of trade is good if it does not go further than is necessary to give reasonable protection to the person who imposes it. There is nothing illegal in such a covenant, but it is considered unreasonable if it imposes a larger restraint than is necessary for the protection of the covenantee. The courts have, however, seen their way to treat such a covenant as divisible, and to enforce it to the extent to which it is reasonable, while declining to enforce such part of it as is unreasonable. There are many reported cases in which *301covenants in restraint of trade have been held to be divisible as regards space.....No case, however, was cited to me in which a covenant of this kind had been held to be divisible in regard to time, and I postponed my judgment that I might see if any such case had been reported, and I have found the case of Nicholls v. Stretton, 10 Q. B. 346. In that case the defendant, on being articled for five years to the plaintiff, who was a solicitor, covenanted that he would not during the five years nor at any time after the expiration of that term,” etc., do business “ for any person who had already been or who should from time to time thereafter become or be the client,” etc.....“Mr. Cowling then contended that the contract was at least good so far as it concerned the clients who carried on business with the plaintiff at the time of making the indenture, or during the continuance of the articles, and the breaches are confined to these. It is true, he said, that when any contract, whether under seal or not, is in part illegal, the whole contract fails. But that is different from the present case, where the contract is not to do anything illegal, but only to abstain from certain acts, some of which a party cannot bind himself not to do, but may still legally abstain from doing. In such case the law will enforce such restrictions as the party can bind himself to. Mr. Bramwell replied, and the court took time to consider their judgment. Lord Denman, C. J., delivered the judgment of the court thus: ‘This case must be decided in favor of plaintiff,’ etc.....I must, therefore, grant an injunction, but limited to restraining the defendant from serving or interfering with any persons who were customers of the plaintiff Baines at any time during the defendant’s employment by him.”
The contract was enforced to the extent to which it was deemed reasonable, and was held void as to excess.
In Moore etc. Co. v. Towers etc. Co., 87 Ala. 206, 13 Am. St. Rep. 23, defendants sold their business to plaintiffs, and agreed not to handle any more plowstocks or plowblades. There was no restriction as to time or place. *302It was objected to as unreasonable because unlimited. The court said, however, in substance, that a contract was to be construed with reference to the circumstances of the parties and the object sought to be attained by the contract. That in fact the firm was dealing only within a limited territory, and the evident purpose was to protect the plaintiff in his business'. The contract was, therefore, to be construed as limited to the territory covered by plaintiff’s business.
I think this case an advance upon former precedents upon the subject. But whatever difficulty there may be in limiting such a contract as to space, there is none whatever in doing so as to time. In fact, it is practically so limited in the nature of things. The obligation when the purchaser is not engaged in the business within the limited territory is mostly ideal, as only nominal damages could be recovered for a breach, and equity under such circumstances would not intervene to prevent a breach.
The sole purpose here was to protect the plaintiff in the enjoyment of what he had purchased, and the contract was presumably made in view of the law. All the parties sought to attain was within the limits of the law. We neither add to, nor take from, the contract by supposing that the parties contemplated that it should be so limited.
This principle seems to be recognized in Langan v. Langan, 91 Cal. 654. I think, therefore, the contract was valid. I think the complaint sufficiently states a breach of the contract. Even if only nominal damages could be proven, plaintiff would be entitled to his injunction—partly, perhaps, upon the very ground of the difficulty in proving damage.
I advise that the judgment be reversed and the court directed to overrule the demurrer.
Searls, C., and Haynes, C., concurred.
For the reasons given in the foregoing opinion the *303judgment appealed from is reversed, and the court below directed to overrule the demurrer.
Harrison, J., Paterson, J., Garoutte, J.