(a) is the owner and holder of the subject mortgage and note, or has been delegated the authority to institute a mortgage foreclosure action by the owner and holder of the subject mortgage and note; and
(b) has complied with all of the provisions of section five hundred ninety-five-a of the banking law and any rules and regulations promulgated thereunder, section six-l or six-m of the banking law, and section thirteen hundred four of this article. 2. It shall be a defense to an action to foreclose a mortgage for a high-cost home loan or subprime home loan that the terms of the home loan or the actions of the lender violate any provision of section six-l or six-m of the banking law or section thirteen hundred four of this article.