Legal analysis: Yes, unmarried pregnancy of civil servants does not violate the family planning policy, but unmarried pregnancy actually violates the family planning policy. According to the Population and Family Planning Law and other related family planning laws and regulations, cases that violate family planning regulations are "super-birth" and "unmarried pregnancy", but "unmarried pregnancy" is not included. "Birth out of wedlock" and "pregnancy before marriage" are different concepts. "Out-of-wedlock birth" refers to giving birth to a child without obtaining a marriage certificate, which violates family planning regulations; And "pregnancy before marriage" means getting pregnant without getting a marriage certificate. As long as you have a marriage certificate and a birth permit before giving birth, it will meet the requirements.
Legal basis: Article 107 1 of the Civil Code of People's Republic of China (PRC) states that children born out of wedlock enjoy the same rights as those born in wedlock, and no organization or individual may harm or discriminate against them. The biological father or mother who does not directly raise children born out of wedlock shall bear the responsibility for raising minor children or adult children who cannot live independently.