If you have an email thread showing the back and forth between you and management then you have an excellent defense to any lawsuit
However "could be voided" is not the same as voided
Did you declare the lease void per that email and then move out immediately
You need a consultation with a good local real estate attorney if management attempts any collection
I agree with Michael. You need to find a good landlord/tenant lawyer in your area. Either check Avvo or your local bar association. The issue isn't as clear cut as you would like to think that it is. Does the lease require the landlord to replace the carpeting? Does it say that you can terminate the lease if he or she doesn't? What do your emails and other correspondence say?
You will need to take ALL of your materials to a lawyer who can discuss the matter with you based on the documents and give you a better answer.