Now, they married secretly (with good intention and for the sake of Allah), without the consent of his wife, his family and her family. The nikah was done in the presence of two Muslims (strangers to them) and he gave mahr to her and pronounced their nikah. Now they want to know whether the nikah is valid.
بسم الله الرحمن الرحيم
In the above mentioned case if nikah was solemnized as per the Shariah i.e. both did ijab-o-qubul (proper exchange of nikah words) in the presence of two witnesses and the witness heard their ijab-o-qubul then their nikah was valid. Though it is not necessary to seek permission from first wife and family members in order to marry second wife, but if one marries a second woman due to any need then he should do so with the consent of first wife and family members. Otherwise it may cause lots of issues. It should be noted that Shariah allows to marry more than one in case when the husband is able to maintain justice in respect to living, food and equality. It is not lawful as per the Shariah to treat only one of them in good way. Hadith sternly warns about it. Hence in the question mentioned above the second nikah was valid as per the Shariah. The said person should maintain equality and justice between both the wives.
Allah knows Best!
Darul Uloom Deoband