When rental property investors violate home-sharing regulations, depending on where you are, city violations on short-term rentals can get costly.

The city of San Francisco recently reached a $2.25 million settlement with a couple who violated the city’s short-term rental regulations when home sharing on Airbnb.

Darren and Valerie Lee were sued in 2014 after evicting tenants from their property to use it for short-term rentals. They paid $276,000 and were issued a court-authorized injunction that prohibited them from continuing to offer any of their properties as short-term rentals.

That’s a lot of money, but it wasn’t painful enough to teach the Darren and Valerie a lesson. Over the next year, they violated the injunction more than 5,000 times. San Francisco requires property owners renting out units for less than 30 days to register with the city’s office of short-term rentals and be a permanent resident of that unit. The Lee’s failed to register any of their 14 properties with the city and booked more than $900,000 in short-term rentals for a profit of $700,000.

“These are not the type of hosts we want on our platform and we are glad the City has the tools it needs to enforce the rules,” an Airbnb spokesperson told TechCrunch. “We are proud home sharing is legal in San Francisco and look forward to continuing to work with the city.”

Most cities and even individual condominium associations have passed regulations on short-term rentals as home-sharing services like Airbnb grow in popularity. This month, D.C. approved a bill that allows homeowners to rent out space if they are present, but caps it at 90-days when homeowners are not onsite and prohibits the use of second or third homes for home sharing. In Boston, Airbnb is suing the city over regulations that force home-sharing platforms to share information about clients with the city.

Home-sharing in condominium associations is also complicated. Many associations have passed amendments to their declarations or revised rules and regulations to include clauses that limit or prohibit home-sharing altogether.

Being a landlord is tough enough and it’s easy to understand why the couple was tempted to continue doing short-term rentals with their 14 rental properties. In the end, however, the fine they paid cost them well more than they made.

Rental property investors or homeowners who already are home-sharing, or who may be considering it, should pay close attention to local legislation. Your local municipality is serious about regulating this service, even though home-sharing is still a relatively new service and regulations on it are likely to remain in flux while cities get a better idea of how home-sharing affects their city.