Section 3 of the Prohibition of Child Marriage Act, 2006 states that
Child marriages to be voidable at the option of contracting party being a child. –
1. Section 3 states that Every child marriage, whether solemnised before or after the commencement of this Act, shall be voidable at the option of the contracting party who was a child at the time of the marriage: Provided that a petition for annulling a child marriage by a decree of nullity may be filed in the district court only by a contracting party to the marriage who was a child at the time of the marriage.
2. If at the time of filing a petition, the petitioner is a minor, the petition may be filed through his or her guardian or next friend along with the Child Marriage Prohibition Officer.
3. The petition under this section may be filed at any time but before the child filing the petition completes two years of attaining majority.
4. While granting a decree of nullity under this section, the district court shall make an order directing both the parties to the marriage and their parents or their guardians to return to the other party, his or her parents or guardian, as the case may be, the money, valuables, ornaments and other gifts received on the occasion of the marriage by them from the other side, or an amount equal to the value of such valuables, ornaments, other gifts and money:Provided that no order under this section shall be passed unless the concerned parties have been given notices to appear before the district court and show cause why such order should not be passed.
So it's voidable at at the minor contracting party.
In the Hindu Marriage Act, 1955, in section 18, for clause (a), the following clause shall be substituted, namely:-"
I'm case of Hindu marriage Act
In the case of contravention of the condition specified in clause (iii) of section 5, with rigorous imprisonment which may extend to two years or with fine which may extend to one lakh rupees, or with both".
The clause iii of section 5 of the Act states that
5. Custody and maintenance of children of child marriages.-
3. An order for custody of a child may also include appropriate directions for giving to the other party access to the child in such a manner as may best serve the interests of the child, and such other orders as the district court may, in the interest of the child, deem proper.
It will not automatically get void. As it is voidable by the contracting minor party as explained earlier
It speaks about custody of child in such marriages.