Probably, yes, although as I said it would probably never be enforced. To be clear, your landlord is not the one breaking the law. Anyone taking them up on the offer would be though.
IANAL, but I was a licensed real estate agent in NYS about 15 years ago, and this was covered in the course materials.