I saw a great example of this when I was looking at VA gun laws today. They have an exception structured as follows: Virginia law exempts from these requirements any firearms shows held in any town with a population of not less than 1,995 and not more than 2,010, according to the 1990 United States census [1]
[1] https://lawcenter.giffords.org/gun-shows-in-virginia/