I think a "A social code of conduct recognised by law" is what I'm aiming for. Could you post a link to an example?
Not quite a "Social" code, but very close, would be the codes of practice of insurers, bankers, and merchants generally. These are recognised by the Common Law. The authoritative case is Edie V East India Company 2 Burr. 1216 1 W. Bl. 295, but the principle was well accepted by the courts long before. Lord Mansfield was well known for his extensive use of special juries of merchants to advise the courts on such code, in appropriate cases (In those days, of course, the jury could take cognisance of , and give evidence of matters of their own knowledge )
A little earlier, the entire practice of the High Court of Chivalry was based on the recognized Code of Chivalry. In theory , there is nothing to stop a High Court of Chivalry being convened today (though it would be necessary to appoint a Lord High Constable first).
The Courts of Piepowder also based their law on the Codes of Conduct of the fair to which they were holden.