There was literally a legislative marriage bar in the Irish Civil Service from 1924 till 1973.
The marriage bar forced female civil servants in Ireland to resign from their jobs when they got married and stopped married women from joining the permanent civil service.
We were far from the only country to have such mandates, and it was done so as an equivalence with the governance processes of the private sector. Divorce was only legalised in Ireland 1995.