The parties run their own primaries however they want. They don't even need to have a vote at all, in fact at least the Democrats party leaders used to just select the person who is running in the general election. Over the years the Democrats have handed more of the power over to their base.
So that being said, Republicans can run their primary however they wish and can make this a requirement for getting on stage in the debates.
This isn’t fully true. In very narrow circumstances a child can indeed be required to give consent, sign contracts, or make pledges.
Very low hanging examples: Employment contracts when working under the age of 18, drivers license/state ID related applications, and children 16 or older are typically able to give consent and sign documentation for healthcare.