Midrash for Chagigah 3:10
Sifrei Devarim
Which minor is exempt? One who cannot "ride" on his father's shoulder and go up to Jerusalem to the Temple mount. These are the words of Beth Shammai, it being written "your males." Beth Hillel say: One who cannot hold on to his father's hand and go up to Jerusalem to the Temple mount, it being written (Shemoth 23:14) "Three regalim (festivals)," lit., "feet."
Ask RabbiBookmarkShareCopy