
83 Wis.2d 158 (1978)
265 N.W.2d 475
RIEDY, Appellant,
v.
SPERRY, and another, Respondents.
No. 75-863.
Supreme Court of Wisconsin.
Argued March 7, 1978.
Decided May 2, 1978.
*160 For the appellant there was a brief by Raymond E. Krek and Danforth, McKenna & Krek, S. C., and oral argument by Raymond E. Krek, of Jefferson.
For the respondents there was a brief by James C. Alexander and Wightman, Thurow & Sauthoff, and oral argument by Mr. Alexander, of Madison.
HEFFERNAN, J.
This appeal arises out of a trial court order which sustained a demurrer to the plaintiff's complaint which alleged that she had been deprived of her constitutional rights by the actions of municipal officers acting under the color of state law.
The complaint, in effect, although not explicitly, alleges a cause of action secured by the Federal Civil Rights Act, particularly 42 U.S.C. sec. 1983. At the time of the commencement of this action in October 1975, this court had not yet affirmed the jurisdiction of the courts of the State of Wisconsin to entertain civil rights actions based upon 42 U.S.C. sec. 1983. Such jurisdiction was recognized in Terry v. Kolski, 78 Wis.2d 475, 254 N.W.2d 704 (1977). Accordingly, if the plaintiff's complaint in the instant action sets forth sufficient facts to allege a cause of action under 42 U.S.C. sec. 1983, it is within the jurisdiction of the Wisconsin courts to proceed. We conclude that the plaintiff's complaint states a cause of action under sec. 1983, because it alleges conduct under color of state law which, without due process of law, deprived the plaintiff of property, and arguably of liberty interests, protected by the Fourteenth Amendment.
We conclude, moreover, that the trial judge used an improper standard in testing the complaint on demurrer, because he, in effect, hypothesized the plaintiff's inability to factually support the allegations of the complaint and he improperly considered the effect of possible affirmative defenses that had not been pleaded. Accordingly, the *161 demurrer was erroneously sustained and the judgment dismissing the complaint must be reversed.
The complaint alleges that the plaintiff, Mary E. Riedy, operated a nursery school for children in the City of Jefferson and that the nursery school was licensed by the Department of Health and Social Services of the State of Wisconsin. It is acknowledged in the complaint that the license was for a nursery school located at 324 Sanborn Street in the City of Jefferson but, at the times material to the complaint, the plaintiff was operating her school at another location in the City of Jefferson.
She also alleged that she had "fulfilled the necessary custom and law for application for amendment of her said license" for the new address.
She further alleged that the defendant, Richard D. Sperry, was the city attorney for the City of Jefferson and that Charles Johnson was the chief of police for that city, and that each of them, under color of law, entered her nursery school on two occasions demanding that the school be closed. The first such demand was made on September 24, 1975.
It is also alleged that on October 7, 1975, the plaintiff received a letter from the Wisconsin Department of Health and Social Services which demonstrated, in the words of the complaint, "a written indication that she was duly and properly fulfilling the necessary custom in law for application for amendment of her said license ...."
On October 16, 1975, it is alleged that the defendants Sperry and Johnson again entered the plaintiff's school and demanded that the school be closed. On the following day, the plaintiff alleges, she received a letter from the Department of Health and Social Services suspending her right to operate the day care center. She alleges that the *162 letter of suspension was "precipitated by malicious action" of defendant Sperry.
She alleges that the conduct of both defendants interfered with her right to carry on her business, that their conduct was under color of law, that she was afforded no prior hearing, and that she was denied due process of law.
She additionally alleges that Sperry and Johnson conspired to prevent her from exercising her rights and privileges guaranteed by the Constitution and laws of the United States and the State of Wisconsin. She characterizes these rights as her right to due process and her property right to pursue her occupation and profession. She alleges a loss of earnings and profits from her business and alleges that she has suffered, and will suffer, substantial damage to her reputation in the community.
The state law under whose color the defendants allegedly acted was sec. 176.05 (9m), Stats., which provides that:
"(a) No retail `Class A' or `Class B' license shall be issued for premises the main entrance of which is less than 300 feet from the main entrance of any established public school, parochial school, hospital or church. . . ."
[1]
This particular statute was not set forth by number in the complaint, but its general provisions were referred to therein. It was made clear at oral argument, however, that it was upon this statute that reliance was placed by the defendants. We take judicial notice of this statute.[1]
*163 In the trial judge's decision on the demurrer, the following statement appears:
"Reduced to bare bones [___] duty, breach of duty and resulting damages [___] it appears that defendants had a duty under law not to interfere with plaintiff's right to operate a licensed nursery school; defendants also had a duty to enforce the statutes and ordinances within the city while acting as city attorney and chief of police. ..."
This formulation of duty, breach, and damages is more appropriate to a negligent tort than to an intentional one; and, accordingly, we conclude that the trial judge's analysis, in view of the intentional conduct of the defendants, was inappropriate to the facts set forth in the complaint. We point out, however, that the majority opinion in Procunier v. Navarette, ___ U.S. ___, 55 L. Ed.2d 24, 98 S. Ct. 855 (February 22, 1978), failed to address the question of whether sec. 1983 affords a remedy for the negligent deprivation of constitutional rights. See n. 14, at 11, slip opinion. We do not, however, foreclose the possibility that sec. 1983 does afford a remedy for the negligent deprivation of constitutional rights. The question is not presented in this appeal.
The necessary elements of a sec. 1983 action have recently been set forth in Paul v. Davis, 424 U.S. 693, 696-97 (1976). Therein the court stated:
". . . to establish a claim cognizable under sec. 1983 he had to show that petitioners [persons acting under color of state law] had deprived him of a right secured by the Constitution of the United States, and that any such deprivation was achieved under color of law."
[2]
The plaintiff in this action has set forth the minimal allegations for stating a cause of action under sec. 1983. *164 For the purposes of the ruling on demurrer, it must be assumed that the allegation that the defendants acted under color of state law is a verity. The constitutional right of which the plaintiff claims she was deprived was her property right to continue to operate her nursery school unless that right was taken from her by procedures that comported with due process.
[3]
Whether a right is a property right afforded protection by the Constitution of the United States is primarily dependent upon whether the right or interest has been recognized and protected by state law. In this case, the plaintiff alleges that her right to operate the nursery school was secured by license issued by the state. She claims, accordingly, that her right arose out of a status accorded, recognized, and protected by the laws of the State of Wisconsin.
The constitutional protection afforded to rights recognized by state law is discussed in Paul v. Davis, supra, at 710-11:
"It is apparent from our decisions that there exists a variety of interests which are difficult of definition but are nevertheless comprehended within the meaning of either `liberty' or `property' as meant in the Due Process Clause. These interests attain this constitutional status by virtue of the fact that they have been initially recognized and protected by state law, and we have repeatedly ruled that the procedural guarantees of the Fourteenth Amendment apply whenever the State seeks to remove or significantly alter that protected status. In Bell v. Burson, 402 U.S. 535 (1971), for example, the State by issuing drivers' licenses recognized in its citizens a right to operate a vehicle on the highways of the State. The Court held that the State could not withdraw this right without giving petitioner due process. In Morrissey v. Brewer, 408 U.S. 471 (1972), the State afforded parolees the right to remain at liberty as long as the conditions of their parole were not violated. Before the State could alter the status of a parolee because of alleged violations *165 of these conditions, we held that the Fourteenth Amendment's guarantee of due process of law required certain procedural safeguards."
It is true that in this case the plaintiff acknowledged that the license which conferred the protected status was for a location different than that at which she was operating when the conduct of the defendants occurred. Nevertheless, she asserted that she had fulfilled the state law in respect to making application to have her license applicable to her new address. Accordingly, in the language of Paul v. Davis, at 711, she alleges "as a result of the state action complained of, a right or status previously recognized by state law was distinctly altered or extinguished."
The mere allegation, however, that she was deprived of constitutional rights under color of law does not resolve the question whether she is, on the merits, entitled to relief either by injunction or by damages.
[4]
In the posture of a demurrer, now denominated as a motion to dismiss under the revised code of civil procedure of the State of Wisconsin, only the allegations of the complaint are tested. Whether the facts pleaded can be proved or whether defenses may be pleaded and proved that may vitiate the complaint are not questions before the court on demurrer.
The trial judge also exceeded his authority in ruling on the demurrer, because he felt that the plaintiff's allegations could not be proved, and because he also concluded that the defendantsthe city attorney and the chief of policehad affirmative defenses which would defeat the cause of action. In the posture of the pleadings as they come before us, we are as unable as the trial judge to rule on the efficacy of these defenses.
Basically, the trial judge concluded that the officers had an affirmative legal duty to act and that, therefore, *166 their conduct was justified. This, however, is a determination of the merits of the defendants' possible affirmative defenses which had not been pleaded.
[5, 6]
In ruling on a demurrer, a complaint should be liberally construed with a view to achieving substantial justice and a complaint is entitled to all reasonable inferences in its favor. Schweiger v. Loewi & Co., 65 Wis.2d 56, 58, 221 N.W.2d 882 (1974). A demurrer will be overruled if the complaint, expressly or by reasonable inference, states any cause of action. De Bauche v. Knott, 69 Wis.2d 119, 230 N.W.2d 158 (1975). In reaching its determination on demurrer, the court is confined to the allegations of the complaint. Boehm v. Wheeler, 65 Wis. 2d 668, 223 N.W.2d 536 (1974). The trial court cannot hypothesize whether the plaintiff can prove the allegations in the complaint. That is the function of the trier of the fact, and the judge does not have that function at the demurrer stage of the action. He must assume that the facts pleaded are true.
From reading the trial judge's decision on the demurrer, it is apparent that he did not believe that the plaintiff could prevail in the trial of the actionprimarily, it seems, because he felt that the circumstances revealed by the complaint indicated that, because of the relocation of the nursery school, the license issued by the state did not afford any constitutionally protected property right. The trial judge's surmise may well be correct; but, nevertheless, an existing property right was asserted, and it was premature for the trial judge to conclude that the removal of the nursery school to a location not specifically licensed deprived the plaintiff of her constitutionally protected property right.
The complaint should not have been dismissed unless it appeared to a certainty that the plaintiff was entitled to no relief under the facts alleged.
*167 The fact that the plaintiff had no license specifically applicable to Garland Street is not dispositive of her claim, for her cause of action alleged in the complaint is far broader.
The complaint alleged that, without due process of law, the defendants interfered with the plaintiff's right to carry on her business. She also alleges harm to her personal and business reputation. Moreover, as stated above, she alleged that she had "fulfilled the necessary custom and law" for an application to amend her license. Appended to the record is a letter from the Department of Health and Social Services purporting to show that the department had no intention of suspending her operation during the next thirty-day period.
Her allegations assert factual situations which are susceptible to proof in the support of her cause of action. Implicit in her allegations is the statement that, although she had no license, the defendants failed to accord her due process by peremptorily closing her nursery school. This is not an unreasonable, or necessarily a legally unsupportable, position in view of the fact that sec. 48.71 (2), Stats., of which we take judicial notice, requires a thirty-day written notice from the department prior to the closing of a nursery school.
In addition, the plaintiff arguably alleges that, by the letter incorporated in the record, the department granted her a de facto or provisional license for a thirty-day period. The statutes, sec. 48.69, Stats., do indeed afford a provisional license for a day care center which is temporarily unable to conform with legal requirements, and the administrative code, 9 Wis. Adm. Code sec. PW-CY 40.10 (4), March 1976, Register No. 243, provides that the department may afford exceptions to any of the licensing rules when it is assured that the operation of a school will not result in any detrimental effect upon the children in attendance. Accordingly, it is at least minimally alleged *168 that the plaintiff had a constitutionally protected right to continue the operation of her school notwithstanding the fact that she had no formal license specifically naming the Garland Street location.
Implicitly, it also appears that the trial judge prematurely relied upon the affirmative defense of qualified immunity, which is afforded under some circumstances to personsin this case the defendant-municipal officials who act under color of state law.
[7]
As city attorney, the defendant Sperry could indeed argue that he was immune from liability. It has been recognized that prosecuting attorneys, when acting within the scope of their prosecutorial functions, are absolutely immune from damages, the theory being that in so acting they are performing a quasi-judicial function. Imbler v. Pachtman, 424 U.S. 409, 430 (1976); Kipps v. Ewell, 538 F.2d 564 (4th Cir. 1976). However, no holding of the United States Supreme Court has gone so far as to say that the immunity protecting a prosecutor in prosecutorial functions is equally applicable to investigatory or administrative functions. The holdings of the federal trial courts are to the contrary. Maney v. Ratcliff, 399 F. Supp. 760 (E.D. Wis. 1975); Balistrieri v. Warren, 314 F. Supp. 824 (E.D. Wis. 1970).
It would appear, in the instant case, that the defendant Sperry was acting in an investigatory capacity, rather than as a prosecutorial officer of the state. If the facts as pleaded and proved should so reveal, it would appear that his immunity is similar to that accorded to a police officer.
[8, 9]
A police officer is entitled to no absolute immunity, but rather to a "good faith" defense; and if such officer acts in good faith with the reasonable belief in the constitutionality of his actions, immunity will apply. Pierson v. *169 Ray, 386 U.S. 547 (1967); Boscario v. Nelson, 518 F.2d 879 (7th Cir. 1975). The precise scope of the defense in a particular instance is, however, dependent upon the facts and cannot be appropriately decided as a matter of law at the demurrer stage of an action. Basically, whether or not immunity is to be afforded to these defendants is a matter of proof of facts, which can only be injected into the case by pleading an affirmative defense.
Moreover, in the complaint the conduct of the defendant Sperry has been specifically denominated as "malicious." Hence, it appears that, at least in respect to that defendant, allegations have been made which if supported by evidence would negate the possible qualified immunity of the defendant Sperry.
[10]
True, the trial judge in his opinion stated that the demands made by the defendants were not excessive. This is a factual conclusion that could not be reached upon the pleading as they were presented to the trial judge. Good faith is a matter of defense and ordinarily it cannot be determined on demurrer. A malicious action is not one taken in good faith. Hence, even were the hypothesized affirmative defense appropriate, the allegation in the complaint of "malice" shows that a fact issue exists that cannot be resolved on demurrer.
This is not to say that an actual trial of the action must take place before the effect and nature of the affirmative defenses can be determined. But it would appear that the only appropriate method of resolving this issue short of trial would be to require responsive pleadings and the allegation by the defendants of any affirmative defenses that put the facts in issue. The factual issues could then be resolved by a summary judgment if the affidavits of the parties demonstrated that no disputed facts remain or, more likely, they would be resolved only after a trial in which the facts were determined.
*170 We cannot, of course, conclude that the decision of the trial judge to dismiss the complaint may not prove correct as the record develops, but we believe that the language used by Justice John Stevens in his dissent to Procunier v. Navarette, supra, is appropriate to the facts and posture of this case. Therein he said:
". . . I am persuaded that the Court has acted unwisely in reaching out to decide the merits of an affirmative defense before any evidence has been heard and the record as now developed does not completely foreclose the possibility that the plaintiff might be able to disprove a goodfaith defense that has not yet even been pleaded properly." (Slip opinion, dissent at 7)
[11]
We conclude that the plaintiff has stated a cause of action cognizable under 42 U.S.C. sec. 1983 and, therefore, the order sustaining the demurrer must be reversed. The judgment that followed that order must also be reversed, and the cause is remanded for further proceedings not inconsistent with this opinion.
By the Court.Order and judgment reversed; cause remanded for further proceedings.
NOTES
[1]  While it appears from the complaint and from the oral argument that the defendants acted under color of this statute, their reliance upon it was patently and legally erroneous. Subsec. (b) of the same statute provides:

"(b) This subsection shall not apply . . . to any premises licensed as such prior to the occupation of real property within 300 feet thereof by any school building, hospital building or church building." It is obvious, therefore, that this statute does not prohibit a school from commencing operation within 300 feet of a licensed premise. The statute specifically contemplates that possibility, without effect upon the liquor license.
