Fiqh-us-Sunnah Volume 1, Purification and Prayer, Fiqh 1.047.
Section : What invalidates the wiping.
The following invalidates the wiping:
1. The end of the permissible time period for wiping.
2. Post-sex impurity.
3. Removal of the socks. If (i) or (iii) occurs while the person was in a state of purity, he need only wash his feet.