A Saudi Arabia law that went into effect Sunday requires women to be informed by text message if their husbands file for divorce.

The Ministry of Justice regulation aims to curb an ongoing issue of “secret divorces,” according to the BBC, which result when men divorce their wives without telling them. The law is “a step aimed at protecting the rights of female clients,” the Ministry of Justice said in a Friday statement.

Each text message will include the certificate number of the divorce filing and the name of the relevant court. Women will also be able to access divorce documents through the ministry’s website, state-run news channel Al-Ekhbariya reported.

“The new measure ensures women get their [alimony] rights when they’re divorced,” Saudi attorney Nisreen al-Ghamdi told Bloomberg. “It also ensures that any powers of attorney issued before the divorce are not misused.”

The new legislation is part of Saudi Crown Prince Mohammed bin Salman’s Vision 2030, a holistic effort to modernize the country. The crown prince, 33, has recently lifted the ban on women drivers and launched economic reforms such as re-opening movie theaters for the first time in decades.

The country still faces a lot of criticism for its male guardianship program, which requires all women to have a male guardian in order to complete basic tasks such as getting a passport, getting married, traveling internationally or going to school. The male guardian role is often filled by husbands, fathers, brothers and even sometimes sons.

Although the crown prince has publicly pushed for social reforms, the leader has been criticized for cracking down on women’s activists and other peaceful protesters amid the social change. In November, multiple reports surfaced alleging that the Saudi government tortured and sexually harassed several imprisoned women’s rights activists. The news came about a month after it was revealed that Jamal Khashoggi, a Washington Post journalist and resident of the U.S., was tortured, dismembered and beheaded by the Saudi government.