The registration of marriage in court is very important to confirm marriage legally, and therefore customary marriage is a valid marriage in Sharia, but it is not legally valid.
Marriage is proven by the testimony of witnesses even if they do not attend the contract, and it is permissible to testify witnesses by relying on the hearing to prove it, even if they do not know the amount of dowry.