An Imam came to conclude a marriage contract. One of the witnesses (Part No. 18; Page No. 183) did not have the qualifications necessary for bearing witness.
However, the Imam thought well of him hoping that he might have repented. Anyway, marriage was contracted and it turned out later that the witness was not qualified. The contract was then enforced and the husband traveled with his wife. Asking some scholars in his country, he was given the answer that marriage is valid. However, he decided to ask you to confirm this.
The basic principle is that contract is valid in case the witness mentioned above is a Muslim. If he is not a Muslim, the contract will have to be re-concluded to be witnessed by two just witnesses. In this regard, the Prophet (peace be upon him) said,
There is no [valid] marriage without [the permission of] a guardian and [the presence of] two just witnesses.
May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.