validation and parser for cities and countries