The World Federation One Stop Fiqh

Ruling 1176

If an excessive doubter doubts whether or not he has performed a rukn and dismisses his doubt but later realises that he had not performed it, in the event that he has not started to perform the next rukn, he must perform that rukn [about which he doubted] and what follows it. However, if he has started to perform the next rukn, his prayer is invalid based on obligatory precaution. For example, if he doubts whether he has performed rukūʿ or not and dismisses his doubt, in the event that before performing the second sajdah he remembers he has not performed rukūʿ, he must go back and perform rukūʿ; but if he remembers this in the second sajdah, then based on obligatory precaution, his prayer is invalid.