As for the obligation to continue with it, this has been authentically reported from the Companions—from Umar and others.
The Zahiriyyah held that his pilgrimage is invalidated and rendered void, and that he must leave it; for one cannot complete an invalid rite. They argue: Is an invalid act ordained by Allah and His Messenger, peace and blessings be upon him?
If you say yes, that would entail that Allah and His Messenger, peace and blessings be upon him, command invalidity. If you say no, they cite the Prophet’s statement: “Whoever performs an action that is not in accordance with our matter, it is rejected” (1). What is rejected serves no purpose in being done. Allah, Most High, says:
“What would Allah gain by punishing you if you are grateful and believe?” [al-Nisa 4:147]
Some scholars from among the Successors said: He should exit the state of ihram by performing an umrah, and then make it up. Thus, they treat him like one who misses standing at Arafah: he exits the state of ihram through an umrah and becomes released from ihram.
Yet there is no doubt that the Companions, may Allah be pleased with them, possessed knowledge deeper than ours and judgment sounder than ours. They were therefore closer to what is correct than we are, so we follow their views and say: the pilgrimage is invalidated, but one is required to continue with it. There is nothing unusual in this. A man may deliberately break his fast during the daytime in Ramadan without excuse, yet he is still required to abstain for the remainder of the day and make up that fast. Moreover, requiring him to continue entails a form of punishment for him, and it also closes the door to evil. For some people do not mind committing sin; they may have intercourse merely in order to leave the pilgrimage. This, then, serves as a deterrent and discipline for him.
If he continues with this invalid pilgrimage, then—according to the stronger view—its rulings are the same as those of a valid one in all that follows from it with regard to prohibitions and obligations.