The law took years of work by local and national advocates for domestic workers, who will celebrate its adoption at an event in Boston Wednesday night. But enforcement of the law is just beginning, and it is tricky territory for workers, employers, and government officials.

“The law and these regulations make clear that domestic workers have rights just like employees in more traditional workplaces,’’ Massachusetts attorney general Maura Healey said in a statement. “These regulations acknowledge the unique environments these workers are employed in and reinforce the responsibilities employers have for ensuring those rights are protected.”

Healey has filed draft regulations today to support the law, outlining her office’s authority to investigate violations and enforce the law.

Get Talking Points in your inbox:

An afternoon recap of the day’s most important business news, delivered weekdays.

The new rules include ensuring that home workers are paid no less than the $9 minimum wage and that they receive at least one day off a week and two consecutive days off per month for a live-in worker who puts in more than 40 hours a week. They also should get reasonable rest periods, whether paid or unpaid, and the right to privacy and to stay in touch with their family and friends.

Many of the rules seem like common sense, officials and advocates say, but domestic workers are more isolated than other employees and often have verbal arrangements with employers, instead of written ones that both parties can agree on. One of the new rules requires that workers receive written notice on the terms of their employment, including vacation and sick leave policies.

“Today, we take another step forward with the Domestic Workers’ Bill of Rights becoming law,” said state Senator Anthony Petruccelli, a Democrat from East Boston and a sponsor of the bill, in a statement. “Our work to restore employment equity and extend new protections to domestic workers provides the same standard of care and diligence that is provided in the homes of their employers.”

Part of the challenge will be educating both employers and workers about the new law. The attorney general’s staff will be holding educational meetings for nannies, housekeepers, and other home workers, many of whom are new to this country, with modest incomes and still learning English.

Many domestic workers who are underpaid or mistreated in other ways are afraid to come forward. They fear not only losing their jobs and their wages – and sometimes their living quarters – but facing deportation depending on their immigration status. The law and the regulations protect workers regardless of their status, according to the attorney general’s office.

Under the new law, employers are specifically prohibited from taking passports and other personal documents from domestic workers, and from retaliating against those who assert their rights under the new law. The regulations also clarify appropriate deductions for food and lodging, an area abused by some employers, as well as workers’ right to overtime, sick time, and parental leave.

There is a public comment period on the attorney general’s regulations until May 15, and there will be a hearing on May 8.