The condition the man sets for the conditional divorce (the divorce the man gives depending on a specific condition) is null and invalid.
In that specific case, divorce is not accomplished in many aspects.
Allah informs us on how the husband should use the right to divorce through the verses in Qur’an Al-Karim. To accomplish the divorce, there should be witnesses, the woman should be out of her menstruation period, and the spouses must have not had sexual intercourse on the wife’s clean period. Other divorces are contrary to Qur’an and not valid. For details of talaq, please refer to the following fatwa for the conditions of a valid divorce and the following article for further detail:
The divorce that depends on a future condition therefore does not comply with Allah’s commands. Because this is not kind of a divorce He informs us.
The husband’s grant of the right of divorce to the wife is not a condition mentioned in the Qur’an.