divide validate function to ValidateMap
simplify exception