Praise be to Allah.
One of the conditions of the marriage contract being valid is the proposal and acceptance.
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said: The proposal is the words uttered by the wali or his proxy, and the acceptance is the words uttered by the husband or his proxy.
So for example the guardian, such as the father, brother, and so on, says: I give my daughter (or sister) to you in marriage; this is the proposal, and the acceptance is the words uttered by the husband or his proxy.
The one who may take the place of the guardian is his proxy or representative, who is the person to whom he has given permission to act on his behalf whilst he is still alive [like power of attorney]. For example, he can say: I appoint you to act on my behalf in giving my daughter in marriage.
End quote from ash-Sharh al-Mumti‘, 12/37
If the proposal comes from the woman, the marriage contract is not valid, even if it is in the presence of her guardian and with his approval. This is the view of the majority of scholars (may Allah have mercy on them) and this is the view favoured by this website.
But because this matter is the subject of a difference of scholarly opinion, and the people and courts of your country follow the Hanafi madhhab in this issue, then the marriage that was done in this manner is valid, and there is no requirement to repeat it, because the ruling of the authorities is to be followed and the issue is no longer to be regarded as controversial. al-Bahooti (may Allah have mercy on him) said: If a woman gives herself or someone else – such as her slave woman, daughter or sister and so on – in marriage, or the woman appointed someone other than her guardian to give her in marriage, even if that was with the permission of her guardian, the marriage is not valid because its conditions were not fulfilled.
But if a judge rules it to be valid, it is not to be annulled, or if the one who did the marriage contract was a judge who thought that it was valid, it is not to be annulled.
The same applies to all invalid marriages: if they are not regarded as invalid by the one who did them they are not to be annulled, because this is a matter that is subject to ijtihaad, therefore it is not to be annulled if it is deemed to be correct by the one who did it.
End quote from Kashf al-Qinnaa‘, 5/49
However, what is required is to do future marriage contracts in the manner dictated by the Sunnah and approved of by the majority of scholars. So the marriage done in this manner (in which it is stipulated that the marriage contract he done by the guardian) is valid according to scholarly consensus, because it is a precaution to safeguard chastity and avoid a matter concerning which there is a scholarly difference of opinion, unlike the marriage contract which is not done by the guardian as required in sharee‘ah, which the majority of scholars do not regard as valid.
Here it is essential to differentiate between marriages that have already taken place and were deemed to be valid, and people based their actions on that, and future marriages (in which care should be taken to do them in the manner approved of by the majority of scholars).
And Allah knows best.