When Jesus on the cross entrusted the care of Our Lady to John, I often hear it said that this episode proves the perpetual virginity because if Jesus had brothers, He would have been disobeying the Jewish law by entrusting his mother to someone else.

Apparently Jewish law stated that care of the mother had to pass to the next oldest sibling, but I have yet to see a Scripture reference cited in support of this, so where is this law set out in Scripture? Thanks in advance.