When a quarantine is declared, all railroads, steamboats, or other common carriers, and the owners, consignees, or assignees of any railroad, steamboat, or other vehicle used for the transportation of passengers, baggage, or freight, shall submit to any rules or regulations imposed and any examination required by a board of health of a city or general health district or health commissioner. They shall submit to any examination required by the health authorities respecting any circumstances or event touching the health of the crew, operatives, or passengers and the sanitary condition of the baggage and freight.