
474 N.E.2d 109 (1985)
Andrew NOBLE, Stuart Odle, Appellants,
v.
Linda ALIS, Appellee.
No. 1-584A134.
Court of Appeals of Indiana, First District.
February 13, 1985.
Rehearing Denied March 25, 1985.
*110 Michael A.R. Huerta, Philip M. Purcell (Legal Intern), Bloomington, for appellants.
Alfred I. Towell, Bloomington, for appellee.
NEAL, Judge.

STATEMENT OF THE CASE
The Small Claims Division of Monroe Superior Court awarded Linda Alis (Alis) the sum of $1,266.00, such sum representing rent and damages owed by Andrew Noble and Stuart Odle (Noble/Odle) under a one-year lease agreement. Noble/Odle appeal, asserting that the lease was void or voidable because the subject premises was neither registered as a residential rental unit nor had an occupancy permit.
We reverse.

STATEMENT OF THE FACTS
Noble/Odle signed a one-year lease with Alis for an apartment in Bloomington. The lease was to commence on August 16, 1983. In August, prior to their return to Bloomington, the tenants decided not to take possession of the premises and attempted to find a sub-lessee for the apartment. On August 29th, Noble/Odle showed the apartment to prospective sub-lessees and noticed several defects. They contacted the City of Bloomington's Housing Code Enforcement Officer, Ken Young, and requested that he informally inspect the premises for Housing Code violations on September 1, 1983. After the inspection, Young informed Noble/Odle that the landlord was in violation of Bloomington Municipal Code Sec. 16.12.080(e), which states "[i]t shall be a violation of this chapter for any owner to maintain a rental unit without an occupancy permit". Further, Young advised Noble/Odle that even if the house were registered, it would not pass a housing inspection. Believing they could not legally find a sub-lessee, and that their lease was void, Noble/Odle informed Alis on September 1 that they would no longer assume responsibility for locating a sub-lessee. The property was subsequently rented to other tenants on September 15.
The premises had been registered as commercial property by Alis when she first leased it from A.B. Burnham, the legal title holder of the property, four or five years earlier. Evidently the property was registered commercial because the building was also used as a site for juvenile counseling. Alis rented part of the premises during the past four years for residential use without registering it residential and without obtaining an occupancy permit. On August 25th, after becoming aware of the property's residential use, Young sent a letter to Burnham requesting that the property be registered as residential. The request was reiterated on August 30 and September 20; the property was finally registered on October 4. The property was formally inspected on October 17, with 83 violations of the Bloomington Housing Code being cited. Mr. Young testified that the defects were not of a life-threatening nature so the new tenants were not required to move out of the premises. At the time of the trial, January 26, 1984, the residence had not *111 received an occupancy permit, although Alis testified that most of the inside work had been completed.

STATEMENT OF THE ISSUES
Appellants present a single issue for our review: whether a lease signed by a prospective residential tenant is void or voidable when the apartment to be rented is neither registered as a residential rental unit nor has an occupancy permit, as required by the Bloomington Municipal Code.

DISCUSSION AND DECISION
Title 16 of the Bloomington Municipal Code covers the Housing Code and Housing Inspection. The relevant portions of this Title are as follows:
"16.12.060(a) No owner of real estate within the city shall use real estate for the purpose of erecting or maintaining a rental unit thereon without registering such property ...
* * * * * *
16.12.060(e) It shall be a violation of this chapter for any owner to maintain a rental unit which has not been registered in accordance with this section ...
* * * * * *
16.12.080(b) All rental units shall be required to have a current occupancy permit to be displayed on the inside of the main entrance of the unit ...
* * * * * *
16.12.080(e) It shall be a violation of this chapter for any owner to maintain a rental unit without an occupancy permit."
The purpose of the Housing Code is to protect the public health, safety, and welfare in all existing rental units by:
"1. establishing minimum maintenance standards for existing rental units and their premises for basic equipment and facilities for light; ventilation, space heating and sanitation; for safety from fire; for space, use and location; and for safe and sanitary maintenance of rental units now in existence;
2. fixing the responsibilities of owners, operators and occupants of rental units; and
3. providing for administration, enforcement and penalties."
Bloomington, IN. MUNICIPAL CODE, Sec. PM-100.2 (1983). Section 16.12.020 articulates the underlying purpose of the Housing Code (incorporated in full into Chapter 16 of the Bloomington Municipal Code), which is to encourage the maintenance and improvement of the quality of housing in the city of Bloomington.
Appellants contend that because Alis and Burnham violated the express provisions of the Bloomington Municipal Code, the lease agreement is void or voidable.
Broadly speaking, the law is that a contract made in violation of a statute is void. Maddox v. Yocum, (1941) 109 Ind. App. 416, 31 N.E.2d 652. Only infrequently does a legislature, on grounds of public policy, provide that an agreement or term of agreement is unenforceable if it contravenes a statutory provision. Rest.2d Contracts, Sec. 179, Comment (b) (1981). Courts too hesitate to brand an "illegal" bargain necessarily void and thus unenforceable; they engage in a balancing test and evaluate circumstances such as the nature of the subject matter of the contract, the strength of the public policy underlying the statute, the likelihood that a refusal to enforce the bargain or term will further the policy, and how serious or deserved would be the forfeiture suffered by the party attempting to enforce the bargain. Town Planning and Engineering Assoc., Inc. v. Amesbury Specialty Co., Inc., (1976) 369 Mass. 737, 342 N.E.2d 706. See Rest.2d Contracts, Sec. 178 (1981). Judicial decisions emphasize a distinction between statutes for revenue and statutes for protection of the public health, safety, and welfare: in the case of an agreement made in contravention of a statute designed for the protection of the public, "it is more likely that the statute breaker will be denied the enforcement of his bargain". Wilson v. Kealakekua Ranch, Ltd., (1976) 57 *112 Hawaii 124, 551 P.2d 525, 528. See Rest.2d Contracts, Sec. 181 (1981).
In our opinion, the lease in the instant case is unenforceable. We agree with appellants' contention that the policies of protection of public health, safety, and welfare and encouragement of compliance with the housing code are advanced by the registration and occupancy permit provisions of the Municipal Code. Appellants' brief, pg. 13. The procedure to receive such a permit necessitates compliance with minimum housing standards: once the unit is registered residential, a temporary occupancy permit is issued. Bloomington, IN. MUNICIPAL CODE, SEC. 16.12.080(a). The issuance of the temporary permit triggers an inspection by the Housing Department. Id. After the inspection, an occupancy permit is issued; or, if the unit did not "pass" inspection, additional time is granted to make the repairs necessary to bring the unit into compliance with the code. Bloomington, IN. MUNICIPAL CODE, SEC. 16.12.080(a), (c) and (d) (1979). Clearly, the policy of protecting the public from substandard housing is served by the registration-inspection-permit process: until the unit is registered, the Housing Code Enforcement Office is not aware of its existence and thus is unable to check its compliance with the housing standards set down in the code.
Another important factor in our determination that the lease is voidable turns on the specific factual pattern of this case. Here, Noble/Odle never moved into the apartment and thus never benefited in any way from the lease agreement. This case may be distinguished from a situation in which tenants moved into the apartment and then, upon discovering that the apartment was never registered and never received an occupancy permit, attempt to escape future rental payments as well as demand a refund on past payments. In the latter case, the tenants' remedy rests on their ability to prove a breach of an implied warranty of habitability, as in Breezewood Management Co. v. Maltbie, (1980) Ind. App., 411 N.E.2d 670.
In Breezewood, two students entered into a one-year lease for the rental of an apartment in Bloomington. Immediately after they moved into the apartment, they found numerous defects; they soon discovered that the structure was not registered residential, and upon inspection by the Housing Code Enforcement Officer, it was learned that there were over fifty violations, eleven of which were life-threatening. Eventually the tenants vacated the premises and Breezewood brought suit for the balance of rent due. The tenants counterclaimed, contending that Breezewood had breached an implied warranty of habitability, and they sought damages and abatement of rent. Breezewood, supra, at 671.
This court upheld the judgment of the trial court awarding damages upon the tenants' counterclaims. We noted that since the Housing Code was in effect and the premises violated many of its provisions, Breezewood breached an implied warranty of habitability. Id. at 675. Such a breach does not, however, suspend a tenant's obligation to pay rent and allow no damages recoverable to the landlord. Id. Instead, the measure of damages is the difference between the rental value of the apartment as warranted and the actual rental value of the apartment in its defective condition. In other words, tenants were obligated to pay the actual rental value of the apartment inasmuch as they derived some benefit from the rental arrangement.
Here, however, the tenants never entered into possession, and the lease was a voidable agreement on the basis of its non-compliance with several provisions of the Housing Code. Appellee Alis argues that Noble/Odle did not break the lease because of the lack of an occupancy permit but only discovered the information after the fact and used it to their benefit. This contention is irrelevant. The lease was voidable because it was in contravention of an ordinance designed for the protection of the public welfare. Had Noble/Odle moved into the apartment, derived some benefit *113 from the lease agreement, and then attempted to escape their obligations under the lease on the basis of the lack of the permit, their cause of action would have proceeded in the same manner as the claim in Breezewood. As a matter of fact, Noble/Odle raised the warranty of habitability issue in their answer, but the court did not find that such warranty was breached. As Alis points out, appellants have not disputed this determination on appeal.
Alis argues that if the city of Bloomington intended to make void or voidable leases of rental units which are unregistered or without occupancy permits, it would be invading the power of the state and the policy that contract law be uniform statewide. She cites City of Bloomington v. Chuckney, (1975) 165 Ind. App. 177, 331 N.E.2d 780 for this proposition. The Chuckney holding is inapplicable to the instant case.
In Chuckney, the First District of the Indiana Court of Appeals upheld a trial court's determination that certain sections of a city ordinance concerning residential rental housing in Bloomington were ultra vires. Chuckney, supra, 331 N.E.2d at 781. The court discussed extensively the limitations on the power of a city to enact laws or ordinances. It recognized that "virtually all police regulation infringes upon private relationships to some extent"; however, it opined the parts of the ordinance at issue in Chuckney "so directly affect the landlord-tenant relationship that they cannot be upheld as an incident to the exercise of an independent municipal power.". Id., 331 N.E.2d at 783. The offending portions of the ordinance dictated specific terms to be included in every residential lease agreement in Bloomington which, the Chuckney court stated, "are wholly unrelated to city housing and safety codes and cannot, therefore, be incident to the city police powers in those areas". Id. The registration and permit requirements in the present case, on the other hand, are directly related to the Bloomington Housing Code inasmuch as the registration process triggers an inspection for violations of the code. Clearly such requirements are a valid exercise of the city's police power. See City of Indianapolis v. Clint's Wrecker Service, (1982) Ind. App., 440 N.E.2d 737.
We note further, as appellants do, that the relevant language of the code states only that it is a violation of the code for an owner to maintain a rental unit without complying with registration requirements or without obtaining an occupancy permit. The code does not declare void or voidable lease agreements which have as their subject unregistered and "permit-less" property. Rather, it is our decision which renders them voidable.
In conclusion, the clear purpose of the Bloomington Housing Code is to provide minimum standards for rental units to protect the health, safety, and welfare of the public. To that end, Bloomington clearly forbids landlords to rent property for human habitation without complying with the ordinance. Any contrary decision by us would render the ordinance a nullity and permit landlords to ignore it and continue to rent substandard housing as before, taking a chance that the renters, ignorant of the ordinance, would not complain.
The decision of the trial court as to damages for rental payments is reversed, and Alis is ordered to return the $330.00 security deposit plus interest accrued at the statutory rate.
Judgment reversed.
RATLIFF, P.J., and ROBERTSON, J., concur.
