
111 Cal.App.3d 789 (1980)
168 Cal. Rptr. 789
ROBERT H. WYNN, Plaintiff and Appellant,
v.
MONTEREY CLUB et al., Defendants and Respondents.
Docket No. 58417.
Court of Appeals of California, Second District, Division Two.
November 5, 1980.
*793 COUNSEL
Allan H. Liebert for Plaintiff and Appellant.
Coyle, Marrone & Robinson, Richard B. Coyle and J. Alan Frederick for Defendants and Respondents.
OPINION
COMPTON, J.
Plaintiff in an action captioned "BREACH OF CONTRACT, FRAUD AND NEGLIGENCE" appeals from a summary judgment entered in favor of defendants who are owners and operators of the Rainbow and the Monterey Clubs. The latter are card clubs licensed by the City of Gardena. We reverse.
The allegations in the complaint, the declarations filed in connection with the motion for summary judgment, and matters of which we may take judicial notice reveal the following facts.
The two card clubs in question maintain, on their premises, areas which are furnished with tables and chairs at which patrons are permitted to play certain described card games for money. The management does not participate in the games but collects from each player a rental per half hour based upon the limit and maximum bet for the game in progress. Hence the higher the wagering, the higher the income to the management.
Each of the clubs affords to certain of its patrons the privilege of cashing checks. There is no question but that the prime purpose of the check cashing activity is to obtain funds for gambling.
*794 Plaintiff's wife is a compulsive gambler who apparently attempted unsuccessfully to cure her problem by membership in an organization known as Gamblers Anonymous. It appears that she, as well as her propensities, were known to the defendants. She was afforded check cashing privileges at the club.
During the latter part of 1973, plaintiff's wife suffered heavy losses while gambling at the two clubs. She cashed $1,750 worth of checks which were dishonored because of insufficient funds.
It is conceded that her gambling debts were not chargeable to plaintiff's and wife's community property. The wife's gambling problem, however, did place a severe strain on their marriage.
Plaintiff contacted defendant Lochhead, one of the general partners in the operation of the two clubs, by telephone and discussed the problem of his wife's indebtedness. According to plaintiff an agreement was reached whereby plaintiff would undertake to satisfy his wife's debts to the two clubs in exchange for defendants' promise to deny his wife access to the clubs and deny her any further check cashing privileges.
The telephone conversation was followed by a letter from defendant Lochhead to plaintiff which read as follows: "Thank you for your call of Friday, December the 14th. [¶] Mrs. Wynn is indebted to the Monterey Cafe in the amount of $1750.,  consisting of checks written during the previous thirty days. These checks, as you know, were returned by her bank marked NSF. [¶] As I told you over the phone Mrs. Wynn has been barred from both the Monterey and Rainbow Clubs; she will not be allowed to play in any of the games; and she has been denied all check cashing privileges. [¶] Your proposed method of repaying the clubs for her bad checks is satisfactory and I very much appreciate your cooperation."
Plaintiff, during the ensuing year, paid the obligation in full. During that period and for approximately another year thereafter the wife apparently refrained from gambling. In May of 1977, however, plaintiff learned that his wife was again gambling and cashing checks at the defendants' clubs. She apparently had suffered losses of approximately $30,000 and had begun to borrow money from friends to cover those losses.
*795 According to plaintiff the marriage was destroyed and he commenced an action for dissolution. He contemporaneously filed the instant action.
The gravamen of plaintiff's complaint against defendants is that defendants, by deliberately or negligently breaching their contract, caused the disruption of the marriage, which resulted in plaintiff suffering physical and emotional distress compensable by way of general and punitive damages.
Defendants interposed general and special demurrers to the complaint. When the trial court overruled the demurrers, defendants petitioned for a writ of mandate which was denied by this court. Defendants then moved for summary judgment which was granted on condition that defendants refund to plaintiff the $1,750 plus interest from December of 1974.
(1a) It is apparent from the record that the sole basis for the granting of the summary judgment was the trial court's view that the contract, upon which plaintiff relies, is illegal and unenforceable. If the trial court's conclusion in that regard was in error then summary judgment was improperly granted for the reason that the moving papers expose a number of triable issues of fact. (Code Civ. Proc., § 437c; Hayward Union etc. School Dist. v. Madrid (1965) 234 Cal. App.2d 100 [44 Cal. Rptr. 268].)
The essential elements of a contract are competent parties, consent, sufficient consideration and a lawful objective. (Civ. Code, § 1550.) Of these four elements, only the one of a lawful objective is at issue here. A contract is illegal if contrary to an express provision of law, public policy or good morals. (Civ. Code, § 1667.)
Defendants' claim of illegality rests on their assertion that they lacked legal authority to bar plaintiff's wife from access to their establishments because of the proscription of Civil Code section 51,[1]*796 otherwise known as the Unruh Civil Rights Act, and the holdings of the California Supreme Court in Orloff v. Los Angeles Turf Club (1951) 36 Cal.2d 734 [227 P.2d 449]; Stoumen v. Reilly (1951) 37 Cal.2d 713 [234 P.2d 969], and In re Cox (1970) 3 Cal.3d 205 [90 Cal. Rptr. 24, 474 P.2d 992].
If, however, the defendants had the legal authority, under the circumstances, to bar plaintiff's wife from the premises, they could lawfully contract to exercise that authority for a lawful purpose. Defendants make no contention that they were obligated by any law to afford check cashing priveleges to plaintiff's wife. Such privileges are obviously provided as a stimulus to gambling which in turn increases defendants' revenue.
(2a) Civil Code section 51, on its face, appears to be aimed at preventing discrimination in public accommodations on the basis of race, sex or religion. In In re Cox, supra, however, it was held that the Unruh Civil Rights Act prohibits a business establishment from arbitrarily excluding any prospective customer. (Also see, Stoumen v. Reilly, supra.)
Orloff v. Los Angeles Turf Club, supra, which was decided prior to the enactment of Civil Code section 51 as it is now worded, held that places of public entertainment were required to admit any member of the public who did not create a disturbance or commit any unlawful act on the premises. The Orloff case involved a "known gambler" who was barred from the Santa Anita Race Track simply because of his reputation. Similarly, Stoumen v. Reilly, supra, involved the barring of homosexuals from a restaurant and bar.
In re Cox, supra, recognized, however, the right of a business establishment to adopt reasonable restrictions on its customers when those restrictions are rationally related to the business being conducted or the facilities and services being provided. The Supreme Court in Orloff v. Los Angeles Turf Club, supra, also specifically stated that its decision was not intended to foreclose the possibility that a person once properly ejected from a premises might thereafter be properly denied admission.
(3a) Defendants take the position that the wife's conduct in issuing the insufficient funds checks provided legal justification for barring her *797 from the clubs until such time as the debt to them was satisfied. With that position we agree.
On the other hand defendants contend that, once the debt was satisfied, their ability to deny access was terminated. With that position we disagree.
(2b) There is nothing in the language or underlying purpose of Civil Code section 51 or the cases interpreting it to indicate that its application or nonapplication turns on the narrow question of whether the potential customer is indebted to the establishment. The overriding issue is always whether the denial of access to public accommodation is based on race, sex, religion or other arbitrary and unjustified grounds.
(3b) Since the factors of race, sex or religion are not here involved the issue narrows to one of arbitrariness.
As stated earlier, defendants concede, and we agree, that the issuing of the insufficient funds checks was legal justification for refusing plaintiff's wife access to the gambling accommodations at least until she satisfied her obligation.
In our opinion, however, there are factors here which transcend the simple fact of the unsatisfied debt. (4a) Those factors are that the wife was a compulsive gambler who had manifested a propensity to gamble beyond her means to the extent of committing what was possibly an illegal act, all of which was having a detrimental effect on her own well-being as well as that of her husband, and these factors were all known to the defendants.
(3c) These enumerated factors were not dissipated by the mere act of making restitution. They subsisted as justification for continued refusal to admit the wife to the gambling facilities. This conclusion is consistent with the provisions of the Unruh Act and the rule of Orloff v. Los Angeles Turf Club, supra, 36 Cal.2d 734.
(4b) Having concluded that the contract in question is not rendered illegal by any express provision of law, we turn to the issue of whether it is contrary to public policy or morals.
There is nothing immoral in attempting, by lawful means, to prevent an individual from physical or economic self-destruction, or an attempt *798 by lawful means to prevent a person with a recognizable mental or emotional disorder from causing harm to third persons.
By analogy it seems clear that an establishment which serves liquor would be legally and morally justified in refusing access or service to an obviously intoxicated person or one who had, in the past, become intoxicated on the premises and created a disturbance or caused harm to third persons. This justification exists apart from the statutory prohibition against serving an obviously intoxicated person or habitual drunkard.[2]
(3c) The barring of such an individual would not be arbitrary but instead would constitute good business and social practice. Such a restriction is reasonably related to the operation of the premises, based in part upon the commission of an unlawful act. In terms of social and economic impact there is little distinction between a compulsion for gambling and a compulsion for alcohol. Both are recognized mental disorders.[3]
(4c) The crucial question is one of public policy. Is a contract between two persons which seeks to bar a third person from access to certain types of public facilities, contrary to public policy, even though such contract is not prohibited by an express provision of law? The answer to that question must be decided on a case-by-case basis, depending on the relationship of the parties and the type of facilities involved.
This case involves gambling establishments and not some form of harmless entertainment. Plaintiff has a strong and protectable interest in the preservation of the marriage and the emotional well-being of himself and his wife. The wife suffers from a recognized mental disorder and has overtly manifested her propensities. The contract was an *799 attempt by lawful means to prevent harm to both spouses and the marriage itself. It did not violate the public policy which seeks to preserve to all persons freedom of action and choice.
(1b) We do not decide the exact terms of the contract here or rule on whether plaintiff and defendants in fact contracted for a permanent barring of plaintiff's wife from the two gambling clubs. Nor do we pass on the issue of causation. All are factual questions which must be decided in a trial. We do hold that defendants' claim of illegality does not entitle them to summary judgment.
(5) The remaining question, and one which neither of the parties has addressed, is whether the type of damage claimed by plaintiff is compensable beyond the return of the initial consideration, i.e., the $1,750. The trial judge in overruling demurrers to the complaint determined that plaintiff had pleaded a cause of action. Our denial of the petition for mandate affirmed that determination. Nothing presented at the hearing on the motion for summary judgment detracts from that determination.
As previously noted, plaintiff's claim to damages rests on his assertion that defendants' breach of the contract led to a destruction of the marriage with resultant financial, physical and emotional harm to plaintiff. The issue of financial loss is a matter of proof within the confines of the general rule requiring proof of foreseeable damages which flow from a breach of contract. (Hadley v. Baxendale, 9 Ex. 341, 156 Eng.Rep., p. 145; Civ. Code, § 3300.)
As for compensating plaintiff for physical or emotional harm it is clear that, under the circumstances, such harm was reasonably foreseeable and was, in contemplation of the contracting parties, likely to result from a breach of the contract. Defendants were well aware of the wife's propensities and the impact that her ganbling was having on plaintiff personally and the marriage in particular. They well knew that plaintiff's motivation in entering into the contract was to preserve the tranquillity of the marriage and plaintiff's emotional well-being.
(6) The traditional rule, however, has been that damages are not recoverable for mental suffering resulting from a breach of contract. (Westwater v. Grace Church (1903) 140 Cal. 339 [73 P. 1055]; Mack v. Hugh W. Comstock Associates (1964) 225 Cal. App.2d 583 [37 Cal. *800 Rptr. 466]; O'Neil v. Spillane (1975) 45 Cal. App.3d 147 [119 Cal. Rptr. 245].)
On the other hand it was stated in Westervelt v. McCullough (1923) 68 Cal. App. 198 [221 P. 661], at pages 208-209, "Whenever the terms of a contract relate to matters which concern directly the comfort, happiness, or personal welfare of one of the parties, or the subject matter of which is such as directly to affect or move the affection, self-esteem, or tender feelings of that party, he may recover damages for physical suffering or illness proximately caused by its breach." (Italics added.) (See also Chelini v. Nieri (1948) 32 Cal.2d 480 [196 P.2d 915]; Cohen v. Groman Mortuary, Inc. (1964) 231 Cal. App.2d 1 [41 Cal. Rptr. 481].)
In Windeler v. Scheers Jewelers (1970) 8 Cal. App.3d 844 [88 Cal. Rptr. 39], the Court of Appeal approved an award for physical injury growing out of the breach of a bailment contract involving jewelry with great sentimental value. The "physical" injury consisted of headaches, loss of sleep and general nervousness.
The traditional rule was further eroded in Crisci v. Security Ins. Co. (1967) 66 Cal.2d 425 [58 Cal. Rptr. 13, 426 P.2d 173], where the Supreme Court permitted recovery of damages for mental suffering in the case of bad faith refusal of an insurer to settle a claim against its insured in violation of a covenant of fair dealing. The court in Crisci did, however, treat the insured's cause of action as sounding in tort as well as contract.
Most recently, in the case of Molien v. Kaiser Foundation Hospitals (1980) 27 Cal.3d 916 [167 Cal. Rptr. 831, 616 P.2d 813], the Supreme Court, in a tort action, discarded the rule that mental suffering was compensable only when accompanied by physical injury.
In the case at bench, plaintiff's cause of action does not sound in tort. Defendants' duty arose from the contract obligation.[4] Hence we must determine whether plaintiff's claim to damages for emotional distress are compensable as a result of a breach of contract.
Civil Code section 43.5 specifically states that there is no cause of action in California for alienation of affection. That provision, however, *801 did not trouble the Supreme Court in Molien v. Kaiser Foundation Hospitals, supra, in holding that a husband had a cause of action for negligently causing him emotional and mental distress and loss of consortium as a result of a misdiagnosis of the wife's physical condition "`causing a break-up of their marriage and the initiation of dissolution proceedings.'"
Against the background of such persuasive precedent we have no difficulty in concluding that the only limitation on plaintiff's recovery in this case is the language of Civil Code section 3300 which provides: "For the breach of an obligation arising from contract, the measure of damages, except where otherwise expressly provided by this code, is the amount which will compensate the party aggrieved for all the detriment proximately caused thereby, or which, in the ordinary course of things, would be likely to result therefrom." (Italics added.)
In Leavy v. Cooney (1963) 214 Cal. App.2d 496 [29 Cal. Rptr. 580], pure mental and emotional suffering was held to be compensable in a breach of contract case. There it was held that the contracting parties contemplated that a breach of the contract would result in "humiliation and embarrassment" to the plaintiff.
(1c) In the case at bench, our analysis is that, for purposes of determining the propriety of a summary judgment, the contract was a lawful contract which by its nature put the defendants on notice that a breach thereof would result in emotional and mental suffering by the plaintiff as well as other forms of compensable damage. In light of that conclusion it is patent that the defendants in moving for summary judgment did not negate the presence of triable issues of fact.
The judgment is reversed and the matter is remanded to the trial court with directions to vacate its order granting defendants' motion for summary judgment and to enter a new and different order denying the same.
Beach, J., concurred.
ROTH, P.J.
I concur. I think it pertinent, however, to point out that any logical analysis of the contract at bench shows that it was the clear intent of the husband plaintiff and it was so understood by defendants that defendants deny monetary credit to plaintiff's wife and specifically that they refrain from cashing her checks.
*802 There can be no argument that public policy does not frown upon a promise made for a consideration not to cash the check of or extend credit to one who has a history of default at the instance of another who feels a moral obligation to cure such default. At bench, defendants knew plaintiff paid the spurious checks only because his wife was involved and they knew and/or should have known that the relationship between them was under strain because of wife's gambling and would continue to be if the wife's compulsive gambling habit were not controlled. Realistically analyzed, the admitted contract shows that plaintiff paid the defaulted checks of his wife for the primary purpose of preventing the extension of credit in any form to his compulsively gambling wife. We know of no legal principle which obligates owners of a business operated for those who gamble, albeit legally, to extend credit or cash the checks of their customers.
A petition for a rehearing was denied November 25, 1980, and respondents' petition for a hearing by the Supreme Court was denied January 28, 1981.
NOTES
[1]  Civil Code section 51 reads as follows: "This section shall be known, and may be cited, as the Unruh Civil Rights Act. [¶] All persons within the jurisdiction of this state are free and equal, and no matter what their sex, race, color, religion, ancestry, or national origin are entitled to the full and equal accommodations, advantages, facilities, privileges, or services in all business establishments of every kind whatsoever. [¶] This section shall not be construed to confer any right or privilege on a person which is conditioned or limited by law or which is applicable alike to persons of every sex, color, race, religion, ancestry, or national origin."
[2]  Business and Professions Code section 25602 provides: "(a) Every person who sells, furnishes, gives, or causes to be sold, furnished, or given away, any alcoholic beverage to any habitual or common drunkard or to any obviously intoxicated person is guilty of a misdemeanor."
[3]  The Diagnostic and Statistical Manual of Mental Disorders (3d ed. 1980) promulgated by the American Psychiatric Association, at pages 291-293, classifies pathological gambling as a mental disorder involving impulse control. Related problems are described as defaulting on financial responsibilities, disrupted family relationships and forgery.

That same manual at pages 169-170, characterizes alcohol abuse and alcohol dependence as mental disorders with associated problems similar to pathological gambling.
[4]  Since plaintiff has pleaded only the contract theory, we need not decide whether, under certain circumstances, a duty could rest on a noncontractual basis.
