In the Valmiki Ramayana, Rama decides to banish Sita because the citizens of his kingdom are unhappy about her remaining with him after she spent so much time imprisoned by Ravana (the citizens suspect her of infidelity).
One explanation for his decision is that he did this to uphold one of the rules of his kingdom, which declared that a wife who has stayed in another man's house cannot remain married to her husband, and to show that as the ruler he himself was not above this law. But the source online where this detail about the rule of the kingdom was stated did not cite any Hindu texts.
Is this rule, that in the Kosala kingdom a married woman who stays in the house of a man who is not her husband cannot remain married to her husband (that it is grounds for divorce and that she should be divorced), documented in any Hindu texts?