Union Government
(1) All doubts and disputes arising out of or in connection with the election of a President or Vice-President shall be inquired into and decided by the Supreme Court, whose decision shall be final. (2) If an election is declared void by the Supreme Court, acts already done by that person in exercise of the office's powers before the decision are not invalidated by the declaration. (3) Parliament may by law regulate matters connected with such elections. (4) Such an election shall not be questioned merely because of a vacancy among the members of the electoral college that elected them.
Any legal dispute about whether a presidential or vice-presidential election was validly conducted goes exclusively to the Supreme Court, whose ruling is final. Importantly, even if an election is later declared invalid, official acts the person already performed while in office remain valid - protecting the stability of government actions already taken.
If a losing candidate in a presidential election challenges the result, that legal challenge is filed directly in the Supreme Court - and even if the Court eventually finds the election invalid, laws already signed or actions already taken by that President in the meantime are not undone.