(NEXSTAR) – An outfit may not be the first thing most people think of before heading to the polls, but a misstep while dressing could jeopardize one’s vote.

All states have some restrictions when it comes to voting in person, and most states have rules about actively campaigning within a certain distance of a polling place. Some states, however, have extended that rule to include a dress code.

In California, for example, the electioneering ban within 100 feet of the polls includes hats, shirts and buttons. The Golden State is one of 21 that have state statutes banning electioneering apparel at the polls, according to the National Conference of State Legislatures. The others are:

  • Arkansas
  • Delaware
  • Indiana
  • Kansas
  • Maine
  • Michigan
  • Minnesota
  • Montana
  • Nebraska
  • Nevada
  • New Hampshire
  • New Jersey
  • New Mexico
  • New York
  • North Dakota
  • Rhode Island
  • South Carolina
  • Tennessee
  • Texas
  • Vermont

Banned apparel items vary depending on the state, but include buttons, hats, shirts, stickers and other articles of clothing.

“…a person may not wear a badge, insignia, emblem, or other similar communicative device relating to a candidate, measure, or political party appearing on the ballot, or to the conduct of the election, in the polling place,” Texas law states.

That’s right, in nearly half of U.S. states, those T-shirts emblazoned with candidates’ faces or campaign slogans would be considered electioneering, or an attempt to influence someone’s vote. State laws vary when it comes to how far someone needs to be from a polling place while electioneering – in Alabama it’s 30 feet from the door, while in Iowa it’s 300 feet.

Violating the rules may result in more than a wasted trip to the polls, depending on what state you live in.

In Kansas, for instance, electioneering is a class C misdemeanor punishable by up to 30 days in jail or up to a $500 fine.

It’s always a good idea to check your local voting guidelines before heading to the polls. Some states like Maine, where campaign apparel isn’t allowed, have exceptions – buttons that “do not exceed 3 inches and are worn by people at the polling place solely for the purpose of voting” are allowed.