The World Federation One Stop Fiqh

Ruling 1160

If a person doubts whether or not he performed one of the rukns of prayers, in the event that he has not started to perform the act after it, he must perform it. For example, before saying tashahhud, if he doubts whether or not he performed two sajdahs, he must perform them. In the event that afterwards he remembers that he had performed that rukn, then based on obligatory precaution, his prayer is invalid as he will have performed an additional rukn.