Thank you for your question. Below is the ruling of Ay Sistani (hA). For further details please refer ti his book of Islamic laws or the rulings of your own Marja in the section of conditions for clothing in prayer. There are separate rules for someone who suffers from incontinence.
Ruling 786. The first condition: the clothing worn by a person performing prayers must be pure, and if someone voluntarily performs prayers with an impure body or with impure clothing, his prayers are invalid.
May you always be successful