Rivera also directed “all males working in an office environment” to wear ties.

He says he’s trying to change the city’s image.

“We just want to let people know that Lawrence is open for business,” he told WBZ NewsRadio 1030 Tuesday, “that they know that the people that are taking care of them are people that are professional, that they take their job seriously. And you really can’t express that if you’re not dressed appropriately.”

So what exactly were city hall workers wearing before the dress code?

“Let’s just say it was not a point of interest for the past administration,” Rivera said. “We want to make sure that people know there’s a new movement afoot to change the culture.”

Even pajamas are part of the ban.

“We just wanted to cover all of our bases and when you do that and you’re not real specific, people will find loopholes. We just wanted to be clear,” the mayor said.

The union representing about a dozen code enforcement officers has filed a grievance over the dress code. Inspector Jorge De Jesus told The Eagle-Tribune he and his colleagues often have to inspect filthy places.

Rivera suggests they change before heading out, then change back to professional attire when they get back.

The mayor also pointed out that unionized city hall employees have a clothing allowance and they need to use it.

As for violators of the dress code, Rivera said, “We’ll write them up. It’s progressive discipline.”

“I’m sure it’s not a fireable offense. It’s just that we want people to take it seriously and we’re not going to shy away from pointing out those who don’t follow the dress code.”