Unfortunately--and unfairly--a ticket is valid even if the parking regulation or restriction is not posted on the street, but only if it is available on, say, a town website. That is legally considered sufficient notice for restrictions such as no overnight parking, or a two-hours-parking-at-a-time limitation. So, yes, the ticket you describe is legal and would be held up in court.