All perfect praise be to Allah, the Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad is His slave and Messenger.
If what is mentioned in the question is true, that your husband asked a dead person in the grave to supplicate for him, then he has indeed committed a great evil, but this act is a religious innovation, and not Shirk (associating partners with Allah).
Ibn Taymiyyah said:
“There are three categories in this regard:
1- The first: to supplicate someone other than Allah who is dead or absent, whether it be a Prophet, a righteous person, or others; so he says, ‘O my master, O so-and-so, help me,’ or ‘I seek your protection,’ or ‘I seek refuge in you’, or ‘Give me victory over my enemy’; and so on. This is Shirk...
2- The second: to say to the dead or absent person from among the Prophets or righteous people, ‘Supplicate Allah for me,’ or ‘Supplicate your Lord for me,’ like what the Christians say to Maryam (Mary) and other than her. No person of knowledge would doubt that this is impermissible and that it is an innovation that no one among the Salaf (righteous predecessors) did…”
For more benefit, please refer to fatwa 348448.
Therefore, there is a difference between the category that is Shirk and the category that is an innovation. Since the example you stated in the question is an innovation and not Shirk, then it has no effect on the validity of the marriage. And praise be to Allah for the fact that he repented for it.
Allah knows best.