There is no law as such. But it also depends on the terms and conditions of the agreement. If the landlord mentioned such clause then he will replace or clean it. Otherwise you can not do anything about it.
When you had clean carpet when you moved in, no. Usually in the time of moving in you would ask for clean carpet, once you lived there for sometime, there not obligated to change.
It is possible to ask your landlord to clean and/ or replace the carpet. Explain the situation with the asthma and ask him if it is possible for him to either steam clean or replace the carpet. If he is not willing to do either, you could have it cleaned yourself with his permission (I'd get it in writing as you never know if damage will occur).
If you have a problem you can tell them,but this isn't against the law.