Substantial performance of a home repair contract may be used as a mitigating circumstance and may be raised as a defense by a person alleged to have committed home repair fraud. Home repair performed in a manner which is of little or no value, or home repair that fails to materially comply with the appropriate municipal, county, state, or federal building regulations or codes is not substantial performance.
Ala. Code § 13A-9-113 (1975)