Hazrat Tawus (may Allah have mercy on him) said: "If a person says, 'If I do not do such-and-such work, then my wife is divorced, insha'Allah,' then making an exception (by saying insha'Allah) is valid in the matters of divorce and freeing a slave."
Hadith Referenceسنن سعید بن منصور / كتاب الطلاق / 2989
Hadith Takhrij«أخرجه سعيد بن منصور فى «سننه» ترقيم الدرالسلفية برقم:، 1812، 1813، وعبد الرزاق فى «مصنفه» برقم: 11326، 11328، 16128، وابن أبى شيبة فى «مصنفه» برقم: 18325»