There is no provision in the statutes, § 298 et seq., Title 46, Code of 1940, requiring a real estate broker suing for commissions to allege and prove that he is licensed. Such a provision does appear in the statutes of some other states. Obviously, decisions in those states, construing the statute, are not persuasive here. We agree that the failure of the real estate agent to procure a license is a defense which must be proved by the defendant, where it is not disclosed by the testimony of the plaintiff. Knight v. Watson, 221 Ala. 69,127 So. 841; Marx v. Lining, 231 Ala. 445, 165 So. 207. In line with our decisions, however, this is a defense which need not be specially pleaded, but may be shown under the general issue.
"The modern rule in England and most of the American states is, if the contract is valid on its face, and the illegality does not appear from the plaintiff's proof, the illegality cannot be proven under the general issue, but must be specially pleaded (the rule followed by us in the former opinion now withdrawn). It is the rule, however, in Alabama and a few other jurisdictions to not enforce a contract in violation of the law and to deny the plaintiff the right to recover upon a transaction contrary to public policy, even if the invalidity of the contract or transaction be not specially pleaded and is developed by *Page 510 the defendant's evidence. * * *" Shearin v. Pizitz, 208 Ala. 244,94 So. 92, 93.
In dealing with a defense similar in principle, this court said:
"We are not favored with brief for appellee, but a study of the record suggests reasons that doubtless prompted the rulings of the trial court. The first to occur to the mind is the absence of any special plea setting up such defense. Doubtless under the weight of authority such a defense must be specially pleaded (9 Cyc. 740, 741), but this is not the rule in this state. In Shearin v. Pizitz, 208 Ala. 244, 94 So. 92, the question is discussed, and following the doctrine of stare decisis it was there held a defense of the character above indicated is available under the general issue. * * *" Wood et al. v. Traders' Securities Co., 221 Ala. 629, 130 So. 398, 400.
See also Fidelity-Phenix Fire Ins. Co. v. Murphy, 226 Ala. 226,230, 146 So. 387.
We interpret the opinion of the Court of Appeals as disclosing that there was no proof plaintiff was unlicensed and what is here said is merely to safeguard any misunderstanding of our own authorities concerning such defense under the general issue.
The writ is therefore due to be denied.
Writ denied.
GARDNER, C. J., and THOMAS and LIVINGSTON, JJ., concur.