Islam distinguishes marriage from a hidden liaison precisely by its openness: Allah praises those who marry chaste women "not fornicators nor takers of secret lovers" (Quran 4:25, and similarly 5:5), and the Sunnah encourages announcing the marriage publicly, including the permitted beating of the duff by women at a wedding (Sahih al-Bukhari 5147) and the walima. The majority of scholars hold that a contract concluded with its conditions — the guardian and two upright witnesses — is valid even if its publicity is delayed, though deliberately concealing it is disliked; Imam Malik held that public announcement (i'lan) is itself required, so that a marriage the spouses instruct the witnesses to keep secret is invalid and must be dissolved. What all agree on is that a so-called marriage with no wali, no witnesses and no announcement — a couple privately declaring themselves married — is not a valid nikah at all. So a couple should not conceal their marriage from their families and community without a genuine necessity, and where concealment has occurred the contract should be brought before a qualified scholar or Islamic court to be regularised.
Q&A · Marriage & Divorce
Is a secret marriage valid, and does a nikah have to be announced?
Evidence — the daleel
On deen2u
Informational, not a personal fatwa. Consult a qualified scholar for rulings on your situation.