BOSTON — The Massachusetts Attorney General is ordering a charter school to stop punishing students for wearing hairstyles that violate the school’s dress policy.

Attorney General Maura Healey’s office wrote a letter to Mystic Valley Regional Charter School on Friday saying its dress code appears to violate laws against racial discrimination.

Healey says the school’s policies that prohibit hair extensions and “unnatural hair colors or styles” effectively single out students of color.

Interim School Director Alexander J. Dan said the letter will be reviewed by the board of trustees at a meeting Sunday night.

The American Civil Liberties Union of Massachusetts filed a complaint against the school Monday.

Parents say students were punished for wearing braids with extensions, while white students were not disciplined for coloring their hair, which is also banned.