If a divorce is made conditional upon the actions of another person, and he does it by mistake
Question

If a man says to his wife: if you go out, consider yourself divorced. She so obeys him and stays at home. But later she forgot and went out without taking his permission. Is this divorce valid?.
Praise be to Allah.Firstly: 
If a man says to his wife, “You are divorced if you go out,” then she goes out knowingly and willingly, the divorce counts as such according to the majority of fuqaha’. 
Some scholars are of the view that if the one who issued this conditional divorce intended thereby to prevent her from going out, and he did not intend divorce, then he has to offer expiation for breaking an oath (kafaarat yameen) if his wife goes out, but that does not count as a divorce. 
But if he intended divorce, then it counts as such when the thing that was made conditional occurs. This is the view favoured by Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him) and some other scholars. 
Secondly: 
If he does the action on which divorce is made conditional by mistake, then the divorce counts as such according to the majority of fuqaha’, in contrast to the view of the Shaafa’is , and of Ahmad according to the report favoured by Shaykh al-Islam Ibn Taymiyah, and regarded as sound by al-Mardawi in al-Insaaf (9/114). 
Similarly, if he makes divorce conditional upon the actions of another person, and he does it by mistake, as in the case asked about here, then the divorce does not count as such according to the Shaafa’is, and this is the more correct opinion. But they stipulated that the other person should be one who pays attention to the words of the husband and is careful not to go against them. But if he does not pay any attention to his words, then the divorce counts as such even if he does it by mistake. 
Shaykh al-Islam Zakariya al-Ansaari said in Usna’l-Mataalib (3/301): Similarly, she is not divorced if it is made conditional upon the actions of another, whether it is the wife or someone else, and he intended thereby to prevent her or him from doing something or to urge her or him to do something, and he is one of those would heed the husband’s conditions and not go against his words because of friendship and the like, and is aware of this condition, and he went against it by mistake or because of ignorance or because he was forced to do so.  
If he did not intend to prevent him from doing something or to urge him to do something, or is one of those who does not care about his conditions, such as the ruler (who would not care about an ordinary’s man’s oaths or conditions), or he did not know about it and he did it, by mistake, or out of ignorance of because he was forced, then she becomes divorced, because the point here is connecting the divorce to a particular action without aiming to prevent or urge anyone to do anything. End quote. 
Ibn Hajar al-Haytami said something similar in al-Fatawa al-Fiqhiyyah al-Kubra (4/178). 
Shaykh Ibn Baaz (may Allah have mercy on him) issued a fatwa concerning a person who made his divorce conditional upon something, then he did it by mistake; his wife is not divorced, because one of the conditions of his doing it is that he should deliberately have done the thing on which his divorce was made conditional, and the one who does it by mistake is not doing it deliberately, according to sharee’ah. Fatawa al-Shaykh Ibn Baaz (22/47). 
Note: according to the view that the one who does it by mistake is excused, the vow of divorce or conditional divorce remains as it is; if the wife goes out without her husband’s permission, with no excuse such as forgetfulness or being forced, then the divorce counts as such if he intended divorce. If he did not intend divorce then he must offer expiation for breaking an oath (kafaarat yameen). 
And Allah knows best.