If a worshipper's Aurah becomes exposed unintentionally, but they cover it immediately before the duration of one pillar passes, their prayer remains valid.

Exposure of the Awrah and Impurity on Clothing