Deuteronomy 23:9 - 23:14
9 “When you go out as an army against your enemies, you shall keep yourself from every evil thing. 10 “If there is among you any man who is unclean because of a nocturnal emission, then he must go outside the camp; he may not reenter the camp. 11 But it shall be when evening approaches, he shall bathe himself with water, and at sundown he may reenter the camp. 12 “You shall also have a place outside the camp and go out there, 13 and you shall have a spade among your tools, and it shall be when you sit down outside, you shall dig with it and shall turn to cover up your excrement. 14 Since Yahweh your God walks in the midst of your camp to deliver you and to give your enemies over to you, therefore your camp must be holy; and He must not see anything indecent among you, or He will turn away from you.