I looked over Num 27-30 after reading Tom’s post and I think the specifics he was talking about are found in Chapter 30.
Num. 30:1-5
1 Moses then gave the Israelites these instructions, just as the LORD had ordered him. 2 Moses said to the heads of the Israelite tribes, "This is what the LORD has commanded: 3
1 When a man makes a vow to the LORD or binds himself under oath to a pledge of abstinence, he shall not violate his word, but must fulfill exactly the promise he has uttered. 4 "When a woman, while still a maiden in her father’s house, makes a vow to the LORD, or binds herself to a pledge, 5 if her father learns of her vow or the pledge to which she bound herself and says nothing to her about it, then any vow or any pledge she has made remains valid.
Num 30:7-9
7 "If she marries while under a vow or under a rash pledge to which she bound herself, 8 and her husband learns of it, yet says nothing to her that day about it, then the vow or pledge she had made remains valid. 9 But if on the day he learns of it her husband expresses to her his disapproval, he thereby annuls the vow she had made or the rash pledge to which she had bound herself, and the LORD releases her from it.
That says to me, my opinion only of course, that if a vow is taken while still in the house of her parents and the father doesn’t dissaprove of it, it is valid. She was a virgin in the temple according to the protoevangelium and her father and mother both gave her up to the Lord for that purpose so her father obviously approved of her virginity vows, so it is valid to that point.
Now, Joseph was betrothed to Mary, who had vows of virginity and never said anything against it, so her husband also upheld that same vow and it was valid after the marriage as well.