WANG ZHAO/AFP/Getty Images Adult children in Shanghai who do not visit their parents could get sued and have their credit scores dropped, according to a new policy.

The city of Shanghai is about to make it a legal obligation for adult children to visit their parents.

At a press conference last week, authorities in the Chinese city said that offspring who no longer live with their parents must "visit or send greetings often," or else face some pretty severe consequences.

Parents will be able to sue their children if they don't visit, and courts can in turn order the kids to return to their parents' house or nursing home, said Luo Peixin, deputy director of Shanghai's office of legislative affairs.

If children don't comply with the court ruling, they could be entered into a "credit score blacklist," after which they may face difficulties opening bank accounts and getting loans, according to Reference News, an outlet managed by state agency Xinhua News.

Some Chinese media outlets even went so far as to say children who don't visit their parents were like hit-and-run drivers and people who evade subway fares, Reference News noted.

Kevin Frayer via Getty Images The policy is one part of an ordinance named "Regulations Safeguarding the Interests of the Elderly in Shanghai."

The new policy is part of an ordinance, the name of which can be translated to "Regulations Safeguarding the Interests of the Elderly in Shanghai." It was adopted on Jan. 29 and will go into effect on May 1.

By visiting home, children fulfill a moral obligation and provide spiritual comfort to their parents, state-funded media site The Paper noted. Filial piety, or the respect toward elders, is an important part of Chinese Confucianism, a centuries-old philosophy that modern Chinese society still follows closely.

Another reason behind the policy may be the fact that Shanghai is facing an aging population, and the city hopes that filial visits will help cover pension costs, Reference News noted. People over 60 accounted for about 30 percent of the city's total population and the group is expected to grow in the next few years, according to official statistics.

Qilai Shen/Bloomberg via Getty Images One reason behind the policy may be the fact that Shanghai is facing an aging population, and the city hopes that filial visits will help cover pension costs.

Social media users across the country took to Weibo, a popular Chinese microblogging platform, to voice their concerns about the policy. Some worried that children who had unpleasant upbringings would be mandated to visit home.

"What if parents weren't good parents, and abused their children, favored males over females, or did other discriminatory things?" one user wrote. "Then are the kids still obliged to go home often? Would they have to spend money to receive more punishment?"

Many others were perplexed by the government's insistence on intervening in family matters.

"Even visiting home has become a law enforcement issue. Sigh," another user, named Witty Lone Observer, wrote.

Whether or not children visit their parents "is a reflection of a person's upbringing," Sunzixx posted. "Why do we have to tie these things to the law?"

This isn't the first time that the Chinese state has intervened in family matters. The communist country announced a one-child policy in 1979 with the aim of curbing population growth, which it feared would impede development. It then amended the law to establish a two-child policy last October, in an attempt to address the problem of an increasingly large retired population being supported by a shrunken working-age population.

Read more: