You need to distinguish between the legal requirements which are essential for a valid marriage, and the legal requirements which are consequences of a valid marriage.
It’s only a failure to meet conditions of the first kind which will result in a marriage being a nullity.
For example, most jurisdictions have a lower age limit for marriage, and this is normally an essential condition for validity. So long as either of the couple is under that age, then nothing they do will constitute a valid marriage. Similarly, in most jurisdictions it’s a requirement that the couple should be of opposite sexes. But of course each jurisdiction gets to decide for itself what the essential conditions for marriage are. So there may be different minimum ages in different places, and there are some jurisdictions which do permit same-sex couples to marry.
Registration requirements are normally not essential conditions. You are only obliged to register your marriage because you have, in fact, married. Should you fail to register your marriage, you may commit the offence of not registering (and so may the celebrant and/or the witnesses, depending on what the law says about who is responsible for registering a marriage) but you are still married. You may have difficulty proving it, of course.
So, the question comes down to whether the local law makes it an essential condition for marriage that it be celebrated by somebody with a particular qualification. If local law does provide that, and if the marriage is celebrated by somebody without that qualification, then legally you have no marriage. But whether local law does require that is a question that can only be answered jurisdiction by jurisdiction. And two further points:
The mere fact that the law imposes a particular condition or obligation doesn’t mean that it’s essential for a valid marriage. You’d need to read the legislation carefully to decide whether the legislature intended that failure to comply with this requirement would render the marriage a nullity. It’s a question that can only be authoritatively answered by a court.
There;s a particular problem in the US, where the local understanding of separation of church and state means that the courts are extremely reluctant to get involved in ruling who is, and who is not, a bona fide legitimate minister of religion. This can muddy the issue considerably, and it can also lead to the position that “the legislature is unlikely to have intended that using an ‘irregular’ minister would result in a void marriage, because the courts can’t determine who is a regular minister and who is irregular”.
We had a case in Australia a few years back. Ministers of religion are not automatically entitled to celebrate civilly-valid marriages in Australia; they need to be registered as marriage celebrants. This is done on a fast-track basis, with certification from the relevant church authorities; they don’t have to jump through all the hoops that civil celebrants have to. Still, they have to do it, and not all ministers of religion are civilly registered to celebrate marriages.
A couple got married in a large Pentecostal church in (from memory) Sydney, where there was a team of ministers. The senior pastor was registered as a marriage celebrant, but the couple wanted to be married by an assistant pastor with whom they had a close pastoral relationship; he wasn’t registered as a celebrant. Anxious to accommodate the couple, the ministers decided that the assistant pastor would conduct the service, with the senior pastor present in the church, and the senior pastor would later sign the marriage certificate stating, as required, that the couple had celebrated their marriage “before him” or “in his presence”, or some such language. This is what happened. The ministers didn’t trouble the couple by explaining these tedious legal technicalities to them.
In due course unhappy differences arose, and the one of the couple wanted to instituted divorce proceedings. Picture her surprise when she obtained a copy of her marriage certificate and found it signed by a minister who was not, to her recollection, the minister who had presided. Enquiries were made, and the whole story came out.
There was then the most unholy row, with one of the couple seeking a divorce, and the other seeking a declaration that the marriage had been void from the outset (which, at the time, would have made a difference to the terms on which the property and financial issues between the couple would have been settled).
The upshot was that the court ruled that, yes, parliament did intend that a registered celebrant should be an essential condition for marriage, and that when it required the marriage to be celebrated “before” a registered celebrant, it didn’t mean that there should be one present in the congregation. So the couple were found not to have been married. Note that the issue would never have arisen, though, if the couple had not sought a divorce.