there is no law or set rule. It is going to vary from lender to lender.
What they are worried about with the 6 month deal is that you are involved in a flip transaction where you bought from straw buyer last week (who bought from a seller that was in on the scam too) and are now taking out a loan that is worth more than the house and do not intend to ever make a payment.
You can thank scam artists who hit the banks for millions in losses in the mid-2000s for this silly rule requiring borrowers to be "in title" for a certain period of time. Its their response to the mortgage fraud scams, and no matter how legitimate your deal may seem, some lenders have a checklist and if one item on the list can't be checked off, they don't want your loan.