Landlord: Replacing dead pet violates lease

Is such a contract clause legal?