When a man makes a vow to give something to the Lord or takes an oath to abstain from something, he must not break his promise, but must do everything that he said he would.
Look, a messenger is coming over the mountains with good news! He is on his way to announce the victory! People of Judah, celebrate your festivals and give God what you solemnly promised him. The wicked will never invade your land again. They have been totally destroyed!
Then the Israelites made a vow to the Lord: “If you will let us conquer these people, we will unconditionally dedicate them and their cities to you and will destroy them.”
“How terrible for you, blind guides! You teach, ‘If someone swears by the Temple, he isn't bound by his vow; but if he swears by the gold in the Temple, he is bound.’
But don't listen to them, because there are more than forty men who will be hiding and waiting for him. They have taken a vow not to eat or drink until they have killed him. They are now ready to do it and are waiting for your decision.”
So Jephthah went with the leaders of Gilead, and the people made him their ruler and leader. Jephthah stated his terms at Mizpah in the presence of the Lord.
After two months she came back to her father. He did what he had promised the Lord, and she died still a virgin. This was the origin of the custom in Israel