The civil code cannot be applied to the validity of marriage of Chinese citizens A and B married abroad. The effectiveness of the Civil Code mainly applies to the principle of territoriality, that is, the Civil Code applies only to civil activities occurring within the territory of the People's Republic of China, and cannot be applied to civil activities outside the territory.
Legal basis:
Article 12 of the Civil Code of the People's Republic of China
The laws of the People's Republic of China shall apply to civil activities within the territory of the People's Republic of China. If the law provides otherwise, such provisions shall prevail.
Article 1 of the Civil Code of the People's Republic of China
This Law is formulated in accordance with the Constitution in order to protect the legitimate rights and interests of civil subjects, adjust civil relations, maintain social and economic order, meet the requirements of the development of socialism with Chinese characteristics, and promote core socialist values.