Kesubos 12:1-2
Kesubos 12:1
If a man married a woman and she made a condition that he support her daughter for five years, he is obligated to honor his commitment. If she divorced him and married someone else with the same condition, he must nevertheless continue to fulfill that obligation. He may not say that he will only do so if and when the girl comes to live in his house. Rather, he must provide the support where the girl’s mother (his ex-wife) lives. The two men may not agree to support the girl jointly. Rather, the woman's current husband actually feeds her and the ex-husband gives her cash.
Kesubos 12:2
If the daughter got married, her husband must support her, and both of her mother’s husbands must give her cash. If they died, their daughters are supported from property that is not mortgaged to other debts but this girl is supported from mortgaged property because she is like a creditor. Cautious men would write a condition that they’re only obligated to support a wife’s daughter so long as they remain married.