{"modulePath":"github.com/reactima/echo-bind-validate","version":"v0.0.0-20170512220053-141310fd443b","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package govalidator\n\nPackage govalidator is package of validators and sanitizers for strings, structs and collections.\n\n## Constants\n\n```go\nconst (\n\tEmail          string = \"^(((([a-zA-Z]|\\\\d|[!#\\\\$%\u0026'\\\\*\\\\+\\\\-\\\\/=\\\\?\\\\^_`{\\\\|}~]|[\\\\x{00A0}-\\\\x{D7FF}\\\\x{F900}-\\\\x{FDCF}\\\\x{FDF0}-\\\\x{FFEF}])+(\\\\.([a-zA-Z]|\\\\d|[!#\\\\$%\u0026'\\\\*\\\\+\\\\-\\\\/=\\\\?\\\\^_`{\\\\|}~]|[\\\\x{00A0}-\\\\x{D7FF}\\\\x{F900}-\\\\x{FDCF}\\\\x{FDF0}-\\\\x{FFEF}])+)*)|((\\\\x22)((((\\\\x20|\\\\x09)*(\\\\x0d\\\\x0a))?(\\\\x20|\\\\x09)+)?(([\\\\x01-\\\\x08\\\\x0b\\\\x0c\\\\x0e-\\\\x1f\\\\x7f]|\\\\x21|[\\\\x23-\\\\x5b]|[\\\\x5d-\\\\x7e]|[\\\\x{00A0}-\\\\x{D7FF}\\\\x{F900}-\\\\x{FDCF}\\\\x{FDF0}-\\\\x{FFEF}])|(\\\\([\\\\x01-\\\\x09\\\\x0b\\\\x0c\\\\x0d-\\\\x7f]|[\\\\x{00A0}-\\\\x{D7FF}\\\\x{F900}-\\\\x{FDCF}\\\\x{FDF0}-\\\\x{FFEF}]))))*(((\\\\x20|\\\\x09)*(\\\\x0d\\\\x0a))?(\\\\x20|\\\\x09)+)?(\\\\x22)))@((([a-zA-Z]|\\\\d|[\\\\x{00A0}-\\\\x{D7FF}\\\\x{F900}-\\\\x{FDCF}\\\\x{FDF0}-\\\\x{FFEF}])|(([a-zA-Z]|\\\\d|[\\\\x{00A0}-\\\\x{D7FF}\\\\x{F900}-\\\\x{FDCF}\\\\x{FDF0}-\\\\x{FFEF}])([a-zA-Z]|\\\\d|-|\\\\.|_|~|[\\\\x{00A0}-\\\\x{D7FF}\\\\x{F900}-\\\\x{FDCF}\\\\x{FDF0}-\\\\x{FFEF}])*([a-zA-Z]|\\\\d|[\\\\x{00A0}-\\\\x{D7FF}\\\\x{F900}-\\\\x{FDCF}\\\\x{FDF0}-\\\\x{FFEF}])))\\\\.)+(([a-zA-Z]|[\\\\x{00A0}-\\\\x{D7FF}\\\\x{F900}-\\\\x{FDCF}\\\\x{FDF0}-\\\\x{FFEF}])|(([a-zA-Z]|[\\\\x{00A0}-\\\\x{D7FF}\\\\x{F900}-\\\\x{FDCF}\\\\x{FDF0}-\\\\x{FFEF}])([a-zA-Z]|\\\\d|-|\\\\.|_|~|[\\\\x{00A0}-\\\\x{D7FF}\\\\x{F900}-\\\\x{FDCF}\\\\x{FDF0}-\\\\x{FFEF}])*([a-zA-Z]|[\\\\x{00A0}-\\\\x{D7FF}\\\\x{F900}-\\\\x{FDCF}\\\\x{FDF0}-\\\\x{FFEF}])))\\\\.?$\"\n\tCreditCard     string = \"^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\\\d{3})\\\\d{11})$\"\n\tISBN10         string = \"^(?:[0-9]{9}X|[0-9]{10})$\"\n\tISBN13         string = \"^(?:[0-9]{13})$\"\n\tUUID3          string = \"^[0-9a-f]{8}-[0-9a-f]{4}-3[0-9a-f]{3}-[0-9a-f]{4}-[0-9a-f]{12}$\"\n\tUUID4          string = \"^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$\"\n\tUUID5          string = \"^[0-9a-f]{8}-[0-9a-f]{4}-5[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$\"\n\tUUID           string = \"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$\"\n\tAlpha          string = \"^[a-zA-Z]+$\"\n\tAlphanumeric   string = \"^[a-zA-Z0-9]+$\"\n\tNumeric        string = \"^[0-9]+$\"\n\tInt            string = \"^(?:[-+]?(?:0|[1-9][0-9]*))$\"\n\tFloat          string = \"^(?:[-+]?(?:[0-9]+))?(?:\\\\.[0-9]*)?(?:[eE][\\\\+\\\\-]?(?:[0-9]+))?$\"\n\tHexadecimal    string = \"^[0-9a-fA-F]+$\"\n\tHexcolor       string = \"^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$\"\n\tRGBcolor       string = \"^rgb\\\\(\\\\s*(0|[1-9]\\\\d?|1\\\\d\\\\d?|2[0-4]\\\\d|25[0-5])\\\\s*,\\\\s*(0|[1-9]\\\\d?|1\\\\d\\\\d?|2[0-4]\\\\d|25[0-5])\\\\s*,\\\\s*(0|[1-9]\\\\d?|1\\\\d\\\\d?|2[0-4]\\\\d|25[0-5])\\\\s*\\\\)$\"\n\tASCII          string = \"^[\\x00-\\x7F]+$\"\n\tMultibyte      string = \"[^\\x00-\\x7F]\"\n\tFullWidth      string = \"[^\\u0020-\\u007E\\uFF61-\\uFF9F\\uFFA0-\\uFFDC\\uFFE8-\\uFFEE0-9a-zA-Z]\"\n\tHalfWidth      string = \"[\\u0020-\\u007E\\uFF61-\\uFF9F\\uFFA0-\\uFFDC\\uFFE8-\\uFFEE0-9a-zA-Z]\"\n\tBase64         string = \"^(?:[A-Za-z0-9+\\\\/]{4})*(?:[A-Za-z0-9+\\\\/]{2}==|[A-Za-z0-9+\\\\/]{3}=|[A-Za-z0-9+\\\\/]{4})$\"\n\tPrintableASCII string = \"^[\\x20-\\x7E]+$\"\n\tDataURI        string = \"^data:.+\\\\/(.+);base64$\"\n\tLatitude       string = \"^[-+]?([1-8]?\\\\d(\\\\.\\\\d+)?|90(\\\\.0+)?)$\"\n\tLongitude      string = \"^[-+]?(180(\\\\.0+)?|((1[0-7]\\\\d)|([1-9]?\\\\d))(\\\\.\\\\d+)?)$\"\n\tDNSName        string = `^([a-zA-Z0-9]{1}[a-zA-Z0-9_-]{0,62}){1}(\\.[a-zA-Z0-9]{1}[a-zA-Z0-9_-]{1,62})*$`\n\tIP             string = `(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))`\n\tURLSchema      string = `((ftp|tcp|udp|wss?|https?):\\/\\/)`\n\tURLUsername    string = `(\\S+(:\\S*)?@)`\n\tHostname       string = ``\n\tURLPath        string = `((\\/|\\?|#)[^\\s]*)`\n\tURLPort        string = `(:(\\d{1,5}))`\n\tURLIP          string = `([1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(\\.(1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.([0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))`\n\tURLSubdomain   string = `((www\\.)|([a-zA-Z0-9]([-\\.][-\\._a-zA-Z0-9]+)*))`\n\tURL            string = `^` + URLSchema + `?` + URLUsername + `?` + `((` + URLIP + `|(\\[` + IP + `\\])|(([a-zA-Z0-9]([a-zA-Z0-9-]+)?[a-zA-Z0-9]([-\\.][a-zA-Z0-9]+)*)|(` + URLSubdomain + `?))?(([a-zA-Z\\x{00a1}-\\x{ffff}0-9]+-?-?)*[a-zA-Z\\x{00a1}-\\x{ffff}0-9]+)(?:\\.([a-zA-Z\\x{00a1}-\\x{ffff}]{1,}))?))\\.?` + URLPort + `?` + URLPath + `?$`\n\tSSN            string = `^\\d{3}[- ]?\\d{2}[- ]?\\d{4}$`\n\tWinPath        string = `^[a-zA-Z]:\\\\(?:[^\\\\/:*?\"\u003c\u003e|\\r\\n]+\\\\)*[^\\\\/:*?\"\u003c\u003e|\\r\\n]*$`\n\tUnixPath       string = `^(/[^/\\x00]*)+/?$`\n\tSemver         string = \"^v?(?:0|[1-9]\\\\d*)\\\\.(?:0|[1-9]\\\\d*)\\\\.(?:0|[1-9]\\\\d*)(-(0|[1-9]\\\\d*|\\\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\\\.(0|[1-9]\\\\d*|\\\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\\\+[0-9a-zA-Z-]+(\\\\.[0-9a-zA-Z-]+)*)?$\"\n)\n```\nBasic regular expressions for validating strings\n\n```go\nconst (\n\t// Unknown is unresolved OS type\n\tUnknown = iota\n\t// Win is Windows type\n\tWin\n\t// Unix is *nix OS types\n\tUnix\n)\n```\nUsed by IsFilePath func\n\n## Variables\n\n```go\nvar CustomTypeTagMap = \u0026customTypeTagMap{validators: make(map[string]CustomTypeValidator)}\n```\nCustomTypeTagMap is a map of functions that can be used as tags for ValidateStruct function. Use this to validate compound or custom types that need to be handled as a whole, e.g. \\`type UUID \\[16]byte\\` (this would be handled as an array of bytes).\n\n```go\nvar Escape = html.EscapeString\n```\nEscape replace \\\u003c, \u003e, \u0026 and \" with HTML entities.\n\n```go\nvar ISO3166List = []ISO3166Entry{\n\t{\"Afghanistan\", \"Afghanistan (l')\", \"AF\", \"AFG\", \"004\"},\n\t{\"Albania\", \"Albanie (l')\", \"AL\", \"ALB\", \"008\"},\n\t{\"Antarctica\", \"Antarctique (l')\", \"AQ\", \"ATA\", \"010\"},\n\t{\"Algeria\", \"Algérie (l')\", \"DZ\", \"DZA\", \"012\"},\n\t{\"American Samoa\", \"Samoa américaines (les)\", \"AS\", \"ASM\", \"016\"},\n\t{\"Andorra\", \"Andorre (l')\", \"AD\", \"AND\", \"020\"},\n\t{\"Angola\", \"Angola (l')\", \"AO\", \"AGO\", \"024\"},\n\t{\"Antigua and Barbuda\", \"Antigua-et-Barbuda\", \"AG\", \"ATG\", \"028\"},\n\t{\"Azerbaijan\", \"Azerbaïdjan (l')\", \"AZ\", \"AZE\", \"031\"},\n\t{\"Argentina\", \"Argentine (l')\", \"AR\", \"ARG\", \"032\"},\n\t{\"Australia\", \"Australie (l')\", \"AU\", \"AUS\", \"036\"},\n\t{\"Austria\", \"Autriche (l')\", \"AT\", \"AUT\", \"040\"},\n\t{\"Bahamas (the)\", \"Bahamas (les)\", \"BS\", \"BHS\", \"044\"},\n\t{\"Bahrain\", \"Bahreïn\", \"BH\", \"BHR\", \"048\"},\n\t{\"Bangladesh\", \"Bangladesh (le)\", \"BD\", \"BGD\", \"050\"},\n\t{\"Armenia\", \"Arménie (l')\", \"AM\", \"ARM\", \"051\"},\n\t{\"Barbados\", \"Barbade (la)\", \"BB\", \"BRB\", \"052\"},\n\t{\"Belgium\", \"Belgique (la)\", \"BE\", \"BEL\", \"056\"},\n\t{\"Bermuda\", \"Bermudes (les)\", \"BM\", \"BMU\", \"060\"},\n\t{\"Bhutan\", \"Bhoutan (le)\", \"BT\", \"BTN\", \"064\"},\n\t{\"Bolivia (Plurinational State of)\", \"Bolivie (État plurinational de)\", \"BO\", \"BOL\", \"068\"},\n\t{\"Bosnia and Herzegovina\", \"Bosnie-Herzégovine (la)\", \"BA\", \"BIH\", \"070\"},\n\t{\"Botswana\", \"Botswana (le)\", \"BW\", \"BWA\", \"072\"},\n\t{\"Bouvet Island\", \"Bouvet (l'Île)\", \"BV\", \"BVT\", \"074\"},\n\t{\"Brazil\", \"Brésil (le)\", \"BR\", \"BRA\", \"076\"},\n\t{\"Belize\", \"Belize (le)\", \"BZ\", \"BLZ\", \"084\"},\n\t{\"British Indian Ocean Territory (the)\", \"Indien (le Territoire britannique de l'océan)\", \"IO\", \"IOT\", \"086\"},\n\t{\"Solomon Islands\", \"Salomon (Îles)\", \"SB\", \"SLB\", \"090\"},\n\t{\"Virgin Islands (British)\", \"Vierges britanniques (les Îles)\", \"VG\", \"VGB\", \"092\"},\n\t{\"Brunei Darussalam\", \"Brunéi Darussalam (le)\", \"BN\", \"BRN\", \"096\"},\n\t{\"Bulgaria\", \"Bulgarie (la)\", \"BG\", \"BGR\", \"100\"},\n\t{\"Myanmar\", \"Myanmar (le)\", \"MM\", \"MMR\", \"104\"},\n\t{\"Burundi\", \"Burundi (le)\", \"BI\", \"BDI\", \"108\"},\n\t{\"Belarus\", \"Bélarus (le)\", \"BY\", \"BLR\", \"112\"},\n\t{\"Cambodia\", \"Cambodge (le)\", \"KH\", \"KHM\", \"116\"},\n\t{\"Cameroon\", \"Cameroun (le)\", \"CM\", \"CMR\", \"120\"},\n\t{\"Canada\", \"Canada (le)\", \"CA\", \"CAN\", \"124\"},\n\t{\"Cabo Verde\", \"Cabo Verde\", \"CV\", \"CPV\", \"132\"},\n\t{\"Cayman Islands (the)\", \"Caïmans (les Îles)\", \"KY\", \"CYM\", \"136\"},\n\t{\"Central African Republic (the)\", \"République centrafricaine (la)\", \"CF\", \"CAF\", \"140\"},\n\t{\"Sri Lanka\", \"Sri Lanka\", \"LK\", \"LKA\", \"144\"},\n\t{\"Chad\", \"Tchad (le)\", \"TD\", \"TCD\", \"148\"},\n\t{\"Chile\", \"Chili (le)\", \"CL\", \"CHL\", \"152\"},\n\t{\"China\", \"Chine (la)\", \"CN\", \"CHN\", \"156\"},\n\t{\"Taiwan (Province of China)\", \"Taïwan (Province de Chine)\", \"TW\", \"TWN\", \"158\"},\n\t{\"Christmas Island\", \"Christmas (l'Île)\", \"CX\", \"CXR\", \"162\"},\n\t{\"Cocos (Keeling) Islands (the)\", \"Cocos (les Îles)/ Keeling (les Îles)\", \"CC\", \"CCK\", \"166\"},\n\t{\"Colombia\", \"Colombie (la)\", \"CO\", \"COL\", \"170\"},\n\t{\"Comoros (the)\", \"Comores (les)\", \"KM\", \"COM\", \"174\"},\n\t{\"Mayotte\", \"Mayotte\", \"YT\", \"MYT\", \"175\"},\n\t{\"Congo (the)\", \"Congo (le)\", \"CG\", \"COG\", \"178\"},\n\t{\"Congo (the Democratic Republic of the)\", \"Congo (la République démocratique du)\", \"CD\", \"COD\", \"180\"},\n\t{\"Cook Islands (the)\", \"Cook (les Îles)\", \"CK\", \"COK\", \"184\"},\n\t{\"Costa Rica\", \"Costa Rica (le)\", \"CR\", \"CRI\", \"188\"},\n\t{\"Croatia\", \"Croatie (la)\", \"HR\", \"HRV\", \"191\"},\n\t{\"Cuba\", \"Cuba\", \"CU\", \"CUB\", \"192\"},\n\t{\"Cyprus\", \"Chypre\", \"CY\", \"CYP\", \"196\"},\n\t{\"Czech Republic (the)\", \"tchèque (la République)\", \"CZ\", \"CZE\", \"203\"},\n\t{\"Benin\", \"Bénin (le)\", \"BJ\", \"BEN\", \"204\"},\n\t{\"Denmark\", \"Danemark (le)\", \"DK\", \"DNK\", \"208\"},\n\t{\"Dominica\", \"Dominique (la)\", \"DM\", \"DMA\", \"212\"},\n\t{\"Dominican Republic (the)\", \"dominicaine (la République)\", \"DO\", \"DOM\", \"214\"},\n\t{\"Ecuador\", \"Équateur (l')\", \"EC\", \"ECU\", \"218\"},\n\t{\"El Salvador\", \"El Salvador\", \"SV\", \"SLV\", \"222\"},\n\t{\"Equatorial Guinea\", \"Guinée équatoriale (la)\", \"GQ\", \"GNQ\", \"226\"},\n\t{\"Ethiopia\", \"Éthiopie (l')\", \"ET\", \"ETH\", \"231\"},\n\t{\"Eritrea\", \"Érythrée (l')\", \"ER\", \"ERI\", \"232\"},\n\t{\"Estonia\", \"Estonie (l')\", \"EE\", \"EST\", \"233\"},\n\t{\"Faroe Islands (the)\", \"Féroé (les Îles)\", \"FO\", \"FRO\", \"234\"},\n\t{\"Falkland Islands (the) [Malvinas]\", \"Falkland (les Îles)/Malouines (les Îles)\", \"FK\", \"FLK\", \"238\"},\n\t{\"South Georgia and the South Sandwich Islands\", \"Géorgie du Sud-et-les Îles Sandwich du Sud (la)\", \"GS\", \"SGS\", \"239\"},\n\t{\"Fiji\", \"Fidji (les)\", \"FJ\", \"FJI\", \"242\"},\n\t{\"Finland\", \"Finlande (la)\", \"FI\", \"FIN\", \"246\"},\n\t{\"Åland Islands\", \"Åland(les Îles)\", \"AX\", \"ALA\", \"248\"},\n\t{\"France\", \"France (la)\", \"FR\", \"FRA\", \"250\"},\n\t{\"French Guiana\", \"Guyane française (la )\", \"GF\", \"GUF\", \"254\"},\n\t{\"French Polynesia\", \"Polynésie française (la)\", \"PF\", \"PYF\", \"258\"},\n\t{\"French Southern Territories (the)\", \"Terres australes françaises (les)\", \"TF\", \"ATF\", \"260\"},\n\t{\"Djibouti\", \"Djibouti\", \"DJ\", \"DJI\", \"262\"},\n\t{\"Gabon\", \"Gabon (le)\", \"GA\", \"GAB\", \"266\"},\n\t{\"Georgia\", \"Géorgie (la)\", \"GE\", \"GEO\", \"268\"},\n\t{\"Gambia (the)\", \"Gambie (la)\", \"GM\", \"GMB\", \"270\"},\n\t{\"Palestine, State of\", \"Palestine, État de\", \"PS\", \"PSE\", \"275\"},\n\t{\"Germany\", \"Allemagne (l')\", \"DE\", \"DEU\", \"276\"},\n\t{\"Ghana\", \"Ghana (le)\", \"GH\", \"GHA\", \"288\"},\n\t{\"Gibraltar\", \"Gibraltar\", \"GI\", \"GIB\", \"292\"},\n\t{\"Kiribati\", \"Kiribati\", \"KI\", \"KIR\", \"296\"},\n\t{\"Greece\", \"Grèce (la)\", \"GR\", \"GRC\", \"300\"},\n\t{\"Greenland\", \"Groenland (le)\", \"GL\", \"GRL\", \"304\"},\n\t{\"Grenada\", \"Grenade (la)\", \"GD\", \"GRD\", \"308\"},\n\t{\"Guadeloupe\", \"Guadeloupe (la)\", \"GP\", \"GLP\", \"312\"},\n\t{\"Guam\", \"Guam\", \"GU\", \"GUM\", \"316\"},\n\t{\"Guatemala\", \"Guatemala (le)\", \"GT\", \"GTM\", \"320\"},\n\t{\"Guinea\", \"Guinée (la)\", \"GN\", \"GIN\", \"324\"},\n\t{\"Guyana\", \"Guyana (le)\", \"GY\", \"GUY\", \"328\"},\n\t{\"Haiti\", \"Haïti\", \"HT\", \"HTI\", \"332\"},\n\t{\"Heard Island and McDonald Islands\", \"Heard-et-Îles MacDonald (l'Île)\", \"HM\", \"HMD\", \"334\"},\n\t{\"Holy See (the)\", \"Saint-Siège (le)\", \"VA\", \"VAT\", \"336\"},\n\t{\"Honduras\", \"Honduras (le)\", \"HN\", \"HND\", \"340\"},\n\t{\"Hong Kong\", \"Hong Kong\", \"HK\", \"HKG\", \"344\"},\n\t{\"Hungary\", \"Hongrie (la)\", \"HU\", \"HUN\", \"348\"},\n\t{\"Iceland\", \"Islande (l')\", \"IS\", \"ISL\", \"352\"},\n\t{\"India\", \"Inde (l')\", \"IN\", \"IND\", \"356\"},\n\t{\"Indonesia\", \"Indonésie (l')\", \"ID\", \"IDN\", \"360\"},\n\t{\"Iran (Islamic Republic of)\", \"Iran (République Islamique d')\", \"IR\", \"IRN\", \"364\"},\n\t{\"Iraq\", \"Iraq (l')\", \"IQ\", \"IRQ\", \"368\"},\n\t{\"Ireland\", \"Irlande (l')\", \"IE\", \"IRL\", \"372\"},\n\t{\"Israel\", \"Israël\", \"IL\", \"ISR\", \"376\"},\n\t{\"Italy\", \"Italie (l')\", \"IT\", \"ITA\", \"380\"},\n\t{\"Côte d'Ivoire\", \"Côte d'Ivoire (la)\", \"CI\", \"CIV\", \"384\"},\n\t{\"Jamaica\", \"Jamaïque (la)\", \"JM\", \"JAM\", \"388\"},\n\t{\"Japan\", \"Japon (le)\", \"JP\", \"JPN\", \"392\"},\n\t{\"Kazakhstan\", \"Kazakhstan (le)\", \"KZ\", \"KAZ\", \"398\"},\n\t{\"Jordan\", \"Jordanie (la)\", \"JO\", \"JOR\", \"400\"},\n\t{\"Kenya\", \"Kenya (le)\", \"KE\", \"KEN\", \"404\"},\n\t{\"Korea (the Democratic People's Republic of)\", \"Corée (la République populaire démocratique de)\", \"KP\", \"PRK\", \"408\"},\n\t{\"Korea (the Republic of)\", \"Corée (la République de)\", \"KR\", \"KOR\", \"410\"},\n\t{\"Kuwait\", \"Koweït (le)\", \"KW\", \"KWT\", \"414\"},\n\t{\"Kyrgyzstan\", \"Kirghizistan (le)\", \"KG\", \"KGZ\", \"417\"},\n\t{\"Lao People's Democratic Republic (the)\", \"Lao, République démocratique populaire\", \"LA\", \"LAO\", \"418\"},\n\t{\"Lebanon\", \"Liban (le)\", \"LB\", \"LBN\", \"422\"},\n\t{\"Lesotho\", \"Lesotho (le)\", \"LS\", \"LSO\", \"426\"},\n\t{\"Latvia\", \"Lettonie (la)\", \"LV\", \"LVA\", \"428\"},\n\t{\"Liberia\", \"Libéria (le)\", \"LR\", \"LBR\", \"430\"},\n\t{\"Libya\", \"Libye (la)\", \"LY\", \"LBY\", \"434\"},\n\t{\"Liechtenstein\", \"Liechtenstein (le)\", \"LI\", \"LIE\", \"438\"},\n\t{\"Lithuania\", \"Lituanie (la)\", \"LT\", \"LTU\", \"440\"},\n\t{\"Luxembourg\", \"Luxembourg (le)\", \"LU\", \"LUX\", \"442\"},\n\t{\"Macao\", \"Macao\", \"MO\", \"MAC\", \"446\"},\n\t{\"Madagascar\", \"Madagascar\", \"MG\", \"MDG\", \"450\"},\n\t{\"Malawi\", \"Malawi (le)\", \"MW\", \"MWI\", \"454\"},\n\t{\"Malaysia\", \"Malaisie (la)\", \"MY\", \"MYS\", \"458\"},\n\t{\"Maldives\", \"Maldives (les)\", \"MV\", \"MDV\", \"462\"},\n\t{\"Mali\", \"Mali (le)\", \"ML\", \"MLI\", \"466\"},\n\t{\"Malta\", \"Malte\", \"MT\", \"MLT\", \"470\"},\n\t{\"Martinique\", \"Martinique (la)\", \"MQ\", \"MTQ\", \"474\"},\n\t{\"Mauritania\", \"Mauritanie (la)\", \"MR\", \"MRT\", \"478\"},\n\t{\"Mauritius\", \"Maurice\", \"MU\", \"MUS\", \"480\"},\n\t{\"Mexico\", \"Mexique (le)\", \"MX\", \"MEX\", \"484\"},\n\t{\"Monaco\", \"Monaco\", \"MC\", \"MCO\", \"492\"},\n\t{\"Mongolia\", \"Mongolie (la)\", \"MN\", \"MNG\", \"496\"},\n\t{\"Moldova (the Republic of)\", \"Moldova , République de\", \"MD\", \"MDA\", \"498\"},\n\t{\"Montenegro\", \"Monténégro (le)\", \"ME\", \"MNE\", \"499\"},\n\t{\"Montserrat\", \"Montserrat\", \"MS\", \"MSR\", \"500\"},\n\t{\"Morocco\", \"Maroc (le)\", \"MA\", \"MAR\", \"504\"},\n\t{\"Mozambique\", \"Mozambique (le)\", \"MZ\", \"MOZ\", \"508\"},\n\t{\"Oman\", \"Oman\", \"OM\", \"OMN\", \"512\"},\n\t{\"Namibia\", \"Namibie (la)\", \"NA\", \"NAM\", \"516\"},\n\t{\"Nauru\", \"Nauru\", \"NR\", \"NRU\", \"520\"},\n\t{\"Nepal\", \"Népal (le)\", \"NP\", \"NPL\", \"524\"},\n\t{\"Netherlands (the)\", \"Pays-Bas (les)\", \"NL\", \"NLD\", \"528\"},\n\t{\"Curaçao\", \"Curaçao\", \"CW\", \"CUW\", \"531\"},\n\t{\"Aruba\", \"Aruba\", \"AW\", \"ABW\", \"533\"},\n\t{\"Sint Maarten (Dutch part)\", \"Saint-Martin (partie néerlandaise)\", \"SX\", \"SXM\", \"534\"},\n\t{\"Bonaire, Sint Eustatius and Saba\", \"Bonaire, Saint-Eustache et Saba\", \"BQ\", \"BES\", \"535\"},\n\t{\"New Caledonia\", \"Nouvelle-Calédonie (la)\", \"NC\", \"NCL\", \"540\"},\n\t{\"Vanuatu\", \"Vanuatu (le)\", \"VU\", \"VUT\", \"548\"},\n\t{\"New Zealand\", \"Nouvelle-Zélande (la)\", \"NZ\", \"NZL\", \"554\"},\n\t{\"Nicaragua\", \"Nicaragua (le)\", \"NI\", \"NIC\", \"558\"},\n\t{\"Niger (the)\", \"Niger (le)\", \"NE\", \"NER\", \"562\"},\n\t{\"Nigeria\", \"Nigéria (le)\", \"NG\", \"NGA\", \"566\"},\n\t{\"Niue\", \"Niue\", \"NU\", \"NIU\", \"570\"},\n\t{\"Norfolk Island\", \"Norfolk (l'Île)\", \"NF\", \"NFK\", \"574\"},\n\t{\"Norway\", \"Norvège (la)\", \"NO\", \"NOR\", \"578\"},\n\t{\"Northern Mariana Islands (the)\", \"Mariannes du Nord (les Îles)\", \"MP\", \"MNP\", \"580\"},\n\t{\"United States Minor Outlying Islands (the)\", \"Îles mineures éloignées des États-Unis (les)\", \"UM\", \"UMI\", \"581\"},\n\t{\"Micronesia (Federated States of)\", \"Micronésie (États fédérés de)\", \"FM\", \"FSM\", \"583\"},\n\t{\"Marshall Islands (the)\", \"Marshall (Îles)\", \"MH\", \"MHL\", \"584\"},\n\t{\"Palau\", \"Palaos (les)\", \"PW\", \"PLW\", \"585\"},\n\t{\"Pakistan\", \"Pakistan (le)\", \"PK\", \"PAK\", \"586\"},\n\t{\"Panama\", \"Panama (le)\", \"PA\", \"PAN\", \"591\"},\n\t{\"Papua New Guinea\", \"Papouasie-Nouvelle-Guinée (la)\", \"PG\", \"PNG\", \"598\"},\n\t{\"Paraguay\", \"Paraguay (le)\", \"PY\", \"PRY\", \"600\"},\n\t{\"Peru\", \"Pérou (le)\", \"PE\", \"PER\", \"604\"},\n\t{\"Philippines (the)\", \"Philippines (les)\", \"PH\", \"PHL\", \"608\"},\n\t{\"Pitcairn\", \"Pitcairn\", \"PN\", \"PCN\", \"612\"},\n\t{\"Poland\", \"Pologne (la)\", \"PL\", \"POL\", \"616\"},\n\t{\"Portugal\", \"Portugal (le)\", \"PT\", \"PRT\", \"620\"},\n\t{\"Guinea-Bissau\", \"Guinée-Bissau (la)\", \"GW\", \"GNB\", \"624\"},\n\t{\"Timor-Leste\", \"Timor-Leste (le)\", \"TL\", \"TLS\", \"626\"},\n\t{\"Puerto Rico\", \"Porto Rico\", \"PR\", \"PRI\", \"630\"},\n\t{\"Qatar\", \"Qatar (le)\", \"QA\", \"QAT\", \"634\"},\n\t{\"Réunion\", \"Réunion (La)\", \"RE\", \"REU\", \"638\"},\n\t{\"Romania\", \"Roumanie (la)\", \"RO\", \"ROU\", \"642\"},\n\t{\"Russian Federation (the)\", \"Russie (la Fédération de)\", \"RU\", \"RUS\", \"643\"},\n\t{\"Rwanda\", \"Rwanda (le)\", \"RW\", \"RWA\", \"646\"},\n\t{\"Saint Barthélemy\", \"Saint-Barthélemy\", \"BL\", \"BLM\", \"652\"},\n\t{\"Saint Helena, Ascension and Tristan da Cunha\", \"Sainte-Hélène, Ascension et Tristan da Cunha\", \"SH\", \"SHN\", \"654\"},\n\t{\"Saint Kitts and Nevis\", \"Saint-Kitts-et-Nevis\", \"KN\", \"KNA\", \"659\"},\n\t{\"Anguilla\", \"Anguilla\", \"AI\", \"AIA\", \"660\"},\n\t{\"Saint Lucia\", \"Sainte-Lucie\", \"LC\", \"LCA\", \"662\"},\n\t{\"Saint Martin (French part)\", \"Saint-Martin (partie française)\", \"MF\", \"MAF\", \"663\"},\n\t{\"Saint Pierre and Miquelon\", \"Saint-Pierre-et-Miquelon\", \"PM\", \"SPM\", \"666\"},\n\t{\"Saint Vincent and the Grenadines\", \"Saint-Vincent-et-les Grenadines\", \"VC\", \"VCT\", \"670\"},\n\t{\"San Marino\", \"Saint-Marin\", \"SM\", \"SMR\", \"674\"},\n\t{\"Sao Tome and Principe\", \"Sao Tomé-et-Principe\", \"ST\", \"STP\", \"678\"},\n\t{\"Saudi Arabia\", \"Arabie saoudite (l')\", \"SA\", \"SAU\", \"682\"},\n\t{\"Senegal\", \"Sénégal (le)\", \"SN\", \"SEN\", \"686\"},\n\t{\"Serbia\", \"Serbie (la)\", \"RS\", \"SRB\", \"688\"},\n\t{\"Seychelles\", \"Seychelles (les)\", \"SC\", \"SYC\", \"690\"},\n\t{\"Sierra Leone\", \"Sierra Leone (la)\", \"SL\", \"SLE\", \"694\"},\n\t{\"Singapore\", \"Singapour\", \"SG\", \"SGP\", \"702\"},\n\t{\"Slovakia\", \"Slovaquie (la)\", \"SK\", \"SVK\", \"703\"},\n\t{\"Viet Nam\", \"Viet Nam (le)\", \"VN\", \"VNM\", \"704\"},\n\t{\"Slovenia\", \"Slovénie (la)\", \"SI\", \"SVN\", \"705\"},\n\t{\"Somalia\", \"Somalie (la)\", \"SO\", \"SOM\", \"706\"},\n\t{\"South Africa\", \"Afrique du Sud (l')\", \"ZA\", \"ZAF\", \"710\"},\n\t{\"Zimbabwe\", \"Zimbabwe (le)\", \"ZW\", \"ZWE\", \"716\"},\n\t{\"Spain\", \"Espagne (l')\", \"ES\", \"ESP\", \"724\"},\n\t{\"South Sudan\", \"Soudan du Sud (le)\", \"SS\", \"SSD\", \"728\"},\n\t{\"Sudan (the)\", \"Soudan (le)\", \"SD\", \"SDN\", \"729\"},\n\t{\"Western Sahara*\", \"Sahara occidental (le)*\", \"EH\", \"ESH\", \"732\"},\n\t{\"Suriname\", \"Suriname (le)\", \"SR\", \"SUR\", \"740\"},\n\t{\"Svalbard and Jan Mayen\", \"Svalbard et l'Île Jan Mayen (le)\", \"SJ\", \"SJM\", \"744\"},\n\t{\"Swaziland\", \"Swaziland (le)\", \"SZ\", \"SWZ\", \"748\"},\n\t{\"Sweden\", \"Suède (la)\", \"SE\", \"SWE\", \"752\"},\n\t{\"Switzerland\", \"Suisse (la)\", \"CH\", \"CHE\", \"756\"},\n\t{\"Syrian Arab Republic\", \"République arabe syrienne (la)\", \"SY\", \"SYR\", \"760\"},\n\t{\"Tajikistan\", \"Tadjikistan (le)\", \"TJ\", \"TJK\", \"762\"},\n\t{\"Thailand\", \"Thaïlande (la)\", \"TH\", \"THA\", \"764\"},\n\t{\"Togo\", \"Togo (le)\", \"TG\", \"TGO\", \"768\"},\n\t{\"Tokelau\", \"Tokelau (les)\", \"TK\", \"TKL\", \"772\"},\n\t{\"Tonga\", \"Tonga (les)\", \"TO\", \"TON\", \"776\"},\n\t{\"Trinidad and Tobago\", \"Trinité-et-Tobago (la)\", \"TT\", \"TTO\", \"780\"},\n\t{\"United Arab Emirates (the)\", \"Émirats arabes unis (les)\", \"AE\", \"ARE\", \"784\"},\n\t{\"Tunisia\", \"Tunisie (la)\", \"TN\", \"TUN\", \"788\"},\n\t{\"Turkey\", \"Turquie (la)\", \"TR\", \"TUR\", \"792\"},\n\t{\"Turkmenistan\", \"Turkménistan (le)\", \"TM\", \"TKM\", \"795\"},\n\t{\"Turks and Caicos Islands (the)\", \"Turks-et-Caïcos (les Îles)\", \"TC\", \"TCA\", \"796\"},\n\t{\"Tuvalu\", \"Tuvalu (les)\", \"TV\", \"TUV\", \"798\"},\n\t{\"Uganda\", \"Ouganda (l')\", \"UG\", \"UGA\", \"800\"},\n\t{\"Ukraine\", \"Ukraine (l')\", \"UA\", \"UKR\", \"804\"},\n\t{\"Macedonia (the former Yugoslav Republic of)\", \"Macédoine (l'ex‑République yougoslave de)\", \"MK\", \"MKD\", \"807\"},\n\t{\"Egypt\", \"Égypte (l')\", \"EG\", \"EGY\", \"818\"},\n\t{\"United Kingdom of Great Britain and Northern Ireland (the)\", \"Royaume-Uni de Grande-Bretagne et d'Irlande du Nord (le)\", \"GB\", \"GBR\", \"826\"},\n\t{\"Guernsey\", \"Guernesey\", \"GG\", \"GGY\", \"831\"},\n\t{\"Jersey\", \"Jersey\", \"JE\", \"JEY\", \"832\"},\n\t{\"Isle of Man\", \"Île de Man\", \"IM\", \"IMN\", \"833\"},\n\t{\"Tanzania, United Republic of\", \"Tanzanie, République-Unie de\", \"TZ\", \"TZA\", \"834\"},\n\t{\"United States of America (the)\", \"États-Unis d'Amérique (les)\", \"US\", \"USA\", \"840\"},\n\t{\"Virgin Islands (U.S.)\", \"Vierges des États-Unis (les Îles)\", \"VI\", \"VIR\", \"850\"},\n\t{\"Burkina Faso\", \"Burkina Faso (le)\", \"BF\", \"BFA\", \"854\"},\n\t{\"Uruguay\", \"Uruguay (l')\", \"UY\", \"URY\", \"858\"},\n\t{\"Uzbekistan\", \"Ouzbékistan (l')\", \"UZ\", \"UZB\", \"860\"},\n\t{\"Venezuela (Bolivarian Republic of)\", \"Venezuela (République bolivarienne du)\", \"VE\", \"VEN\", \"862\"},\n\t{\"Wallis and Futuna\", \"Wallis-et-Futuna\", \"WF\", \"WLF\", \"876\"},\n\t{\"Samoa\", \"Samoa (le)\", \"WS\", \"WSM\", \"882\"},\n\t{\"Yemen\", \"Yémen (le)\", \"YE\", \"YEM\", \"887\"},\n\t{\"Zambia\", \"Zambie (la)\", \"ZM\", \"ZMB\", \"894\"},\n}\n```\nISO3166List based on [https://www.iso.org/obp/ui/#search/code/](https://www.iso.org/obp/ui/#search/code/) Code Type \"Officially Assigned Codes\"\n\n```go\nvar ISO4217List = []string{\n\t\"AED\", \"AFN\", \"ALL\", \"AMD\", \"ANG\", \"AOA\", \"ARS\", \"AUD\", \"AWG\", \"AZN\",\n\t\"BAM\", \"BBD\", \"BDT\", \"BGN\", \"BHD\", \"BIF\", \"BMD\", \"BND\", \"BOB\", \"BOV\", \"BRL\", \"BSD\", \"BTN\", \"BWP\", \"BYN\", \"BZD\",\n\t\"CAD\", \"CDF\", \"CHE\", \"CHF\", \"CHW\", \"CLF\", \"CLP\", \"CNY\", \"COP\", \"COU\", \"CRC\", \"CUC\", \"CUP\", \"CVE\", \"CZK\",\n\t\"DJF\", \"DKK\", \"DOP\", \"DZD\",\n\t\"EGP\", \"ERN\", \"ETB\", \"EUR\",\n\t\"FJD\", \"FKP\",\n\t\"GBP\", \"GEL\", \"GHS\", \"GIP\", \"GMD\", \"GNF\", \"GTQ\", \"GYD\",\n\t\"HKD\", \"HNL\", \"HRK\", \"HTG\", \"HUF\",\n\t\"IDR\", \"ILS\", \"INR\", \"IQD\", \"IRR\", \"ISK\",\n\t\"JMD\", \"JOD\", \"JPY\",\n\t\"KES\", \"KGS\", \"KHR\", \"KMF\", \"KPW\", \"KRW\", \"KWD\", \"KYD\", \"KZT\",\n\t\"LAK\", \"LBP\", \"LKR\", \"LRD\", \"LSL\", \"LYD\",\n\t\"MAD\", \"MDL\", \"MGA\", \"MKD\", \"MMK\", \"MNT\", \"MOP\", \"MRO\", \"MUR\", \"MVR\", \"MWK\", \"MXN\", \"MXV\", \"MYR\", \"MZN\",\n\t\"NAD\", \"NGN\", \"NIO\", \"NOK\", \"NPR\", \"NZD\",\n\t\"OMR\",\n\t\"PAB\", \"PEN\", \"PGK\", \"PHP\", \"PKR\", \"PLN\", \"PYG\",\n\t\"QAR\",\n\t\"RON\", \"RSD\", \"RUB\", \"RWF\",\n\t\"SAR\", \"SBD\", \"SCR\", \"SDG\", \"SEK\", \"SGD\", \"SHP\", \"SLL\", \"SOS\", \"SRD\", \"SSP\", \"STD\", \"SVC\", \"SYP\", \"SZL\",\n\t\"THB\", \"TJS\", \"TMT\", \"TND\", \"TOP\", \"TRY\", \"TTD\", \"TWD\", \"TZS\",\n\t\"UAH\", \"UGX\", \"USD\", \"USN\", \"UYI\", \"UYU\", \"UZS\",\n\t\"VEF\", \"VND\", \"VUV\",\n\t\"WST\",\n\t\"XAF\", \"XAG\", \"XAU\", \"XBA\", \"XBB\", \"XBC\", \"XBD\", \"XCD\", \"XDR\", \"XOF\", \"XPD\", \"XPF\", \"XPT\", \"XSU\", \"XTS\", \"XUA\", \"XXX\",\n\t\"YER\",\n\t\"ZAR\", \"ZMW\", \"ZWL\",\n}\n```\n\n```go\nvar ParamTagMap = map[string]ParamValidator{\n\t\"length\":       ByteLength,\n\t\"runelength\":   RuneLength,\n\t\"stringlength\": StringLength,\n\t\"matches\":      StringMatches,\n\t\"in\":           isInRaw,\n}\n```\nParamTagMap is a map of functions accept variants parameters\n\n```go\nvar ParamTagRegexMap = map[string]*regexp.Regexp{\n\t\"length\":       regexp.MustCompile(\"^length\\\\((\\\\d+)\\\\|(\\\\d+)\\\\)$\"),\n\t\"runelength\":   regexp.MustCompile(\"^runelength\\\\((\\\\d+)\\\\|(\\\\d+)\\\\)$\"),\n\t\"stringlength\": regexp.MustCompile(\"^stringlength\\\\((\\\\d+)\\\\|(\\\\d+)\\\\)$\"),\n\t\"in\":           regexp.MustCompile(`^in\\((.*)\\)`),\n\t\"matches\":      regexp.MustCompile(`^matches\\((.+)\\)$`),\n}\n```\nParamTagRegexMap maps param tags to their respective regexes.\n\n```go\nvar TagMap = map[string]Validator{\n\t\"email\":          IsEmail,\n\t\"url\":            IsURL,\n\t\"dialstring\":     IsDialString,\n\t\"requrl\":         IsRequestURL,\n\t\"requri\":         IsRequestURI,\n\t\"alpha\":          IsAlpha,\n\t\"utfletter\":      IsUTFLetter,\n\t\"alphanum\":       IsAlphanumeric,\n\t\"utfletternum\":   IsUTFLetterNumeric,\n\t\"numeric\":        IsNumeric,\n\t\"utfnumeric\":     IsUTFNumeric,\n\t\"utfdigit\":       IsUTFDigit,\n\t\"hexadecimal\":    IsHexadecimal,\n\t\"hexcolor\":       IsHexcolor,\n\t\"rgbcolor\":       IsRGBcolor,\n\t\"lowercase\":      IsLowerCase,\n\t\"uppercase\":      IsUpperCase,\n\t\"int\":            IsInt,\n\t\"float\":          IsFloat,\n\t\"null\":           IsNull,\n\t\"uuid\":           IsUUID,\n\t\"uuidv3\":         IsUUIDv3,\n\t\"uuidv4\":         IsUUIDv4,\n\t\"uuidv5\":         IsUUIDv5,\n\t\"creditcard\":     IsCreditCard,\n\t\"isbn10\":         IsISBN10,\n\t\"isbn13\":         IsISBN13,\n\t\"json\":           IsJSON,\n\t\"multibyte\":      IsMultibyte,\n\t\"ascii\":          IsASCII,\n\t\"printableascii\": IsPrintableASCII,\n\t\"fullwidth\":      IsFullWidth,\n\t\"halfwidth\":      IsHalfWidth,\n\t\"variablewidth\":  IsVariableWidth,\n\t\"base64\":         IsBase64,\n\t\"datauri\":        IsDataURI,\n\t\"ip\":             IsIP,\n\t\"port\":           IsPort,\n\t\"ipv4\":           IsIPv4,\n\t\"ipv6\":           IsIPv6,\n\t\"dns\":            IsDNSName,\n\t\"host\":           IsHost,\n\t\"mac\":            IsMAC,\n\t\"latitude\":       IsLatitude,\n\t\"longitude\":      IsLongitude,\n\t\"ssn\":            IsSSN,\n\t\"semver\":         IsSemver,\n\t\"rfc3339\":        IsRFC3339,\n\t\"ISO3166Alpha2\":  IsISO3166Alpha2,\n\t\"ISO3166Alpha3\":  IsISO3166Alpha3,\n\t\"ISO4217\":        IsISO4217,\n}\n```\nTagMap is a map of functions, that can be used as tags for ValidateStruct function.\n\n## Functions\n\n```go\nfunc Abs(value float64) float64\n```\nAbs returns absolute value of number\n\n```go\nfunc BlackList(str, chars string) string\n```\nBlackList remove characters that appear in the blacklist.\n\n```go\nfunc ByteLength(str string, params ...string) bool\n```\nByteLength check string's length\n\n```go\nfunc CamelCaseToUnderscore(str string) string\n```\nCamelCaseToUnderscore converts from camel case form to underscore separated form. Ex.: MyFunc =\u003e my\\_func\n\n```go\nfunc Contains(str, substring string) bool\n```\nContains check if the string contains the substring.\n\n```go\nfunc Count(array []interface{}, iterator ConditionIterator) int\n```\nCount iterates over the slice and apply ConditionIterator to every item. Returns count of items that meets ConditionIterator.\n\n```go\nfunc Each(array []interface{}, iterator Iterator)\n```\nEach iterates over the slice and apply Iterator to every item\n\n```go\nfunc ErrorByField(e error, field string) string\n```\nErrorByField returns error for specified field of the struct validated by ValidateStruct or empty string if there are no errors or this field doesn't exists or doesn't have any errors.\n\n```go\nfunc ErrorsByField(e error) map[string]string\n```\nErrorsByField returns map of errors of the struct validated by ValidateStruct or empty map if there are no errors.\n\n```go\nfunc Filter(array []interface{}, iterator ConditionIterator) []interface{}\n```\nFilter iterates over the slice and apply ConditionIterator to every item. Returns new slice.\n\n```go\nfunc Find(array []interface{}, iterator ConditionIterator) interface{}\n```\nFind iterates over the slice and apply ConditionIterator to every item. Returns first item that meet ConditionIterator or nil otherwise.\n\n```go\nfunc GetLine(s string, index int) (string, error)\n```\nGetLine return specified line of multiline string\n\n```go\nfunc GetLines(s string) []string\n```\nGetLines split string by \"\\\\n\" and return array of lines\n\n```go\nfunc InRange(value, left, right float64) bool\n```\nInRange returns true if value lies between left and right border\n\n```go\nfunc IsASCII(str string) bool\n```\nIsASCII check if the string contains ASCII chars only. Empty string is valid.\n\n```go\nfunc IsAlpha(str string) bool\n```\nIsAlpha check if the string contains only letters (a-zA-Z). Empty string is valid.\n\n```go\nfunc IsAlphanumeric(str string) bool\n```\nIsAlphanumeric check if the string contains only letters and numbers. Empty string is valid.\n\n```go\nfunc IsBase64(str string) bool\n```\nIsBase64 check if a string is base64 encoded.\n\n```go\nfunc IsByteLength(str string, min, max int) bool\n```\nIsByteLength check if the string's length (in bytes) falls in a range.\n\n```go\nfunc IsCIDR(str string) bool\n```\nIsCIDR check if the string is an valid CIDR notiation (IPV4 \u0026 IPV6)\n\n```go\nfunc IsCreditCard(str string) bool\n```\nIsCreditCard check if the string is a credit card.\n\n```go\nfunc IsDNSName(str string) bool\n```\nIsDNSName will validate the given string as a DNS name\n\n```go\nfunc IsDataURI(str string) bool\n```\nIsDataURI checks if a string is base64 encoded data URI such as an image\n\n```go\nfunc IsDialString(str string) bool\n```\nIsDialString validates the given string for usage with the various Dial() functions\n\n```go\nfunc IsDivisibleBy(str, num string) bool\n```\nIsDivisibleBy check if the string is a number that's divisible by another. If second argument is not valid integer or zero, it's return false. Otherwise, if first argument is not valid integer or zero, it's return true (Invalid string converts to zero).\n\n```go\nfunc IsEmail(str string) bool\n```\nIsEmail check if the string is an email.\n\n```go\nfunc IsFilePath(str string) (bool, int)\n```\nIsFilePath check is a string is Win or Unix file path and returns it's type.\n\n```go\nfunc IsFloat(str string) bool\n```\nIsFloat check if the string is a float.\n\n```go\nfunc IsFullWidth(str string) bool\n```\nIsFullWidth check if the string contains any full-width chars. Empty string is valid.\n\n```go\nfunc IsHalfWidth(str string) bool\n```\nIsHalfWidth check if the string contains any half-width chars. Empty string is valid.\n\n```go\nfunc IsHexadecimal(str string) bool\n```\nIsHexadecimal check if the string is a hexadecimal number.\n\n```go\nfunc IsHexcolor(str string) bool\n```\nIsHexcolor check if the string is a hexadecimal color.\n\n```go\nfunc IsHost(str string) bool\n```\nIsHost checks if the string is a valid IP (both v4 and v6) or a valid DNS name\n\n```go\nfunc IsIP(str string) bool\n```\nIsIP checks if a string is either IP version 4 or 6.\n\n```go\nfunc IsIPv4(str string) bool\n```\nIsIPv4 check if the string is an IP version 4.\n\n```go\nfunc IsIPv6(str string) bool\n```\nIsIPv6 check if the string is an IP version 6.\n\n```go\nfunc IsISBN(str string, version int) bool\n```\nIsISBN check if the string is an ISBN (version 10 or 13). If version value is not equal to 10 or 13, it will be check both variants.\n\n```go\nfunc IsISBN10(str string) bool\n```\nIsISBN10 check if the string is an ISBN version 10.\n\n```go\nfunc IsISBN13(str string) bool\n```\nIsISBN13 check if the string is an ISBN version 13.\n\n```go\nfunc IsISO3166Alpha2(str string) bool\n```\nIsISO3166Alpha2 checks if a string is valid two-letter country code\n\n```go\nfunc IsISO3166Alpha3(str string) bool\n```\nIsISO3166Alpha3 checks if a string is valid three-letter country code\n\n```go\nfunc IsISO4217(str string) bool\n```\n\n```go\nfunc IsIn(str string, params ...string) bool\n```\ncheck if string str is a member of the set of strings params\n\n```go\nfunc IsInt(str string) bool\n```\nIsInt check if the string is an integer. Empty string is valid.\n\n```go\nfunc IsJSON(str string) bool\n```\nIsJSON check if the string is valid JSON (note: uses json.Unmarshal).\n\n```go\nfunc IsLatitude(str string) bool\n```\nIsLatitude check if a string is valid latitude.\n\n```go\nfunc IsLongitude(str string) bool\n```\nIsLongitude check if a string is valid longitude.\n\n```go\nfunc IsLowerCase(str string) bool\n```\nIsLowerCase check if the string is lowercase. Empty string is valid.\n\n```go\nfunc IsMAC(str string) bool\n```\nIsMAC check if a string is valid MAC address. Possible MAC formats: 01:23:45:67:89:ab 01:23:45:67:89:ab:cd:ef 01-23-45-67-89-ab 01-23-45-67-89-ab-cd-ef 0123.4567.89ab 0123.4567.89ab.cdef\n\n```go\nfunc IsMongoID(str string) bool\n```\nIsMongoID check if the string is a valid hex-encoded representation of a MongoDB ObjectId.\n\n```go\nfunc IsMultibyte(str string) bool\n```\nIsMultibyte check if the string contains one or more multibyte chars. Empty string is valid.\n\n```go\nfunc IsNatural(value float64) bool\n```\nIsNatural returns true if value is natural number (positive and whole)\n\n```go\nfunc IsNegative(value float64) bool\n```\nIsNegative returns true if value \\\u003c 0\n\n```go\nfunc IsNonNegative(value float64) bool\n```\nIsNonNegative returns true if value \u003e= 0\n\n```go\nfunc IsNonPositive(value float64) bool\n```\nIsNonPositive returns true if value \\\u003c= 0\n\n```go\nfunc IsNull(str string) bool\n```\nIsNull check if the string is null.\n\n```go\nfunc IsNumeric(str string) bool\n```\nIsNumeric check if the string contains only numbers. Empty string is valid.\n\n```go\nfunc IsPort(str string) bool\n```\nIsPort checks if a string represents a valid port\n\n```go\nfunc IsPositive(value float64) bool\n```\nIsPositive returns true if value \u003e 0\n\n```go\nfunc IsPrintableASCII(str string) bool\n```\nIsPrintableASCII check if the string contains printable ASCII chars only. Empty string is valid.\n\n```go\nfunc IsRFC3339(str string) bool\n```\n\n```go\nfunc IsRGBcolor(str string) bool\n```\nIsRGBcolor check if the string is a valid RGB color in form rgb(RRR, GGG, BBB).\n\n```go\nfunc IsRequestURI(rawurl string) bool\n```\nIsRequestURI check if the string rawurl, assuming it was recieved in an HTTP request, is an absolute URI or an absolute path.\n\n```go\nfunc IsRequestURL(rawurl string) bool\n```\nIsRequestURL check if the string rawurl, assuming it was recieved in an HTTP request, is a valid URL confirm to RFC 3986\n\n```go\nfunc IsSSN(str string) bool\n```\nIsSSN will validate the given string as a U.S. Social Security Number\n\n```go\nfunc IsSemver(str string) bool\n```\nIsSemver check if string is valid semantic version\n\n```go\nfunc IsTime(str string, format string) bool\n```\n\n```go\nfunc IsURL(str string) bool\n```\nIsURL check if the string is an URL.\n\n```go\nfunc IsUTFDigit(str string) bool\n```\nIsUTFDigit check if the string contains only unicode radix-10 decimal digits. Empty string is valid.\n\n```go\nfunc IsUTFLetter(str string) bool\n```\nIsUTFLetter check if the string contains only unicode letter characters. Similar to IsAlpha but for all languages. Empty string is valid.\n\n```go\nfunc IsUTFLetterNumeric(str string) bool\n```\nIsUTFLetterNumeric check if the string contains only unicode letters and numbers. Empty string is valid.\n\n```go\nfunc IsUTFNumeric(str string) bool\n```\nIsUTFNumeric check if the string contains only unicode numbers of any kind. Numbers can be 0-9 but also Fractions ¾,Roman Ⅸ and Hangzhou 〩. Empty string is valid.\n\n```go\nfunc IsUUID(str string) bool\n```\nIsUUID check if the string is a UUID (version 3, 4 or 5).\n\n```go\nfunc IsUUIDv3(str string) bool\n```\nIsUUIDv3 check if the string is a UUID version 3.\n\n```go\nfunc IsUUIDv4(str string) bool\n```\nIsUUIDv4 check if the string is a UUID version 4.\n\n```go\nfunc IsUUIDv5(str string) bool\n```\nIsUUIDv5 check if the string is a UUID version 5.\n\n```go\nfunc IsUpperCase(str string) bool\n```\nIsUpperCase check if the string is uppercase. Empty string is valid.\n\n```go\nfunc IsVariableWidth(str string) bool\n```\nIsVariableWidth check if the string contains a mixture of full and half-width chars. Empty string is valid.\n\n```go\nfunc IsWhole(value float64) bool\n```\nIsWhole returns true if value is whole number\n\n```go\nfunc LeftTrim(str, chars string) string\n```\nLeftTrim trim characters from the left-side of the input. If second argument is empty, it's will be remove leading spaces.\n\n```go\nfunc Map(array []interface{}, iterator ResultIterator) []interface{}\n```\nMap iterates over the slice and apply ResultIterator to every item. Returns new slice as a result.\n\n```go\nfunc Matches(str, pattern string) bool\n```\nMatches check if string matches the pattern (pattern is regular expression) In case of error return false\n\n```go\nfunc NormalizeEmail(str string) (string, error)\n```\nNormalizeEmail canonicalize an email address. The local part of the email address is lowercased for all domains; the hostname is always lowercased and the local part of the email address is always lowercased for hosts that are known to be case-insensitive (currently only GMail). Normalization follows special rules for known providers: currently, GMail addresses have dots removed in the local part and are stripped of tags (e.g. some.one+tag@gmail.com becomes someone@gmail.com) and all @googlemail.com addresses are normalized to @gmail.com.\n\n```go\nfunc PadBoth(str string, padStr string, padLen int) string\n```\nPad both sides of string if size of string is less then indicated pad length\n\n```go\nfunc PadLeft(str string, padStr string, padLen int) string\n```\nPad left side of string if size of string is less then indicated pad length\n\n```go\nfunc PadRight(str string, padStr string, padLen int) string\n```\nPad right side of string if size of string is less then indicated pad length\n\n```go\nfunc RemoveTags(s string) string\n```\nRemoveTags remove all tags from HTML string\n\n```go\nfunc ReplacePattern(str, pattern, replace string) string\n```\nReplacePattern replace regular expression pattern in string\n\n```go\nfunc Reverse(s string) string\n```\nReverse return reversed string\n\n```go\nfunc RightTrim(str, chars string) string\n```\nRightTrim trim characters from the right-side of the input. If second argument is empty, it's will be remove spaces.\n\n```go\nfunc RuneLength(str string, params ...string) bool\n```\nRuneLength check string's length Alias for StringLength\n\n```go\nfunc SafeFileName(str string) string\n```\nSafeFileName return safe string that can be used in file names\n\n```go\nfunc SetFieldsRequiredByDefault(value bool)\n```\nSetFieldsRequiredByDefault causes validation to fail when struct fields do not include validations or are not explicitly marked as exempt (using \\`valid:\"-\"\\` or \\`valid:\"email,optional\"\\`). This struct definition will fail govalidator.ValidateStruct() (and the field values do not matter):\n\n\ttype exampleStruct struct {\n\t    Name  string ``\n\t    Email string `valid:\"email\"`\n\nThis, however, will only fail when Email is empty or an invalid email address:\n\n\ttype exampleStruct2 struct {\n\t    Name  string `valid:\"-\"`\n\t    Email string `valid:\"email\"`\n\nLastly, this will only fail when Email is an invalid email address but not when it's empty:\n\n\ttype exampleStruct2 struct {\n\t    Name  string `valid:\"-\"`\n\t    Email string `valid:\"email,optional\"`\n\n```go\nfunc Sign(value float64) float64\n```\nSign returns signum of number: 1 in case of value \u003e 0, -1 in case of value \\\u003c 0, 0 otherwise\n\n```go\nfunc StringLength(str string, params ...string) bool\n```\nStringLength check string's length (including multi byte strings)\n\n```go\nfunc StringMatches(s string, params ...string) bool\n```\nStringMatches checks if a string matches a given pattern.\n\n```go\nfunc StripLow(str string, keepNewLines bool) string\n```\nStripLow remove characters with a numerical value \\\u003c 32 and 127, mostly control characters. If keep\\_new\\_lines is true, newline characters are preserved (\\\\n and \\\\r, hex 0xA and 0xD).\n\n```go\nfunc ToBoolean(str string) (bool, error)\n```\nToBoolean convert the input string to a boolean.\n\n```go\nfunc ToFloat(str string) (float64, error)\n```\nToFloat convert the input string to a float, or 0.0 if the input is not a float.\n\n```go\nfunc ToInt(str string) (int64, error)\n```\nToInt convert the input string to an integer, or 0 if the input is not an integer.\n\n```go\nfunc ToJSON(obj interface{}) (string, error)\n```\nToJSON convert the input to a valid JSON string\n\n```go\nfunc ToString(obj interface{}) string\n```\nToString convert the input to a string.\n\n```go\nfunc Trim(str, chars string) string\n```\nTrim trim characters from both sides of the input. If second argument is empty, it's will be remove spaces.\n\n```go\nfunc Truncate(str string, length int, ending string) string\n```\nTruncate a string to the closest length without breaking words.\n\n```go\nfunc UnderscoreToCamelCase(s string) string\n```\nUnderscoreToCamelCase converts from underscore separated form to camel case form. Ex.: my\\_func =\u003e MyFunc\n\n```go\nfunc ValidateStruct(s interface{}) (bool, error)\n```\nValidateStruct use tags for fields. result will be equal to \\`false\\` if there are any errors.\n\n```go\nfunc WhiteList(str, chars string) string\n```\nWhiteList remove characters that do not appear in the whitelist.\n\n## Types\n\n```go\ntype ConditionIterator func(interface{}, int) bool\n```\nConditionIterator is the function that accepts element of slice/array and its index and returns boolean\n\n```go\ntype CustomTypeValidator func(i interface{}, o interface{}) bool\n```\nCustomTypeValidator is a wrapper for validator functions that returns bool and accepts any type. The second parameter should be the context (in the case of validating a struct: the whole object being validated).\n\n```go\ntype Error struct {\n\tName                     string\n\tErr                      error\n\tCustomErrorMessageExists bool\n}\n```\nError encapsulates a name, an error and whether there's a custom error message or not.\n\n```go\nfunc (e Error) Error() string\n```\n\n```go\ntype Errors []error\n```\nErrors is an array of multiple errors and conforms to the error interface.\n\n```go\nfunc (es Errors) Error() string\n```\n\n```go\nfunc (es Errors) Errors() []error\n```\nErrors returns itself.\n\n```go\ntype ISO3166Entry struct {\n\tEnglishShortName string\n\tFrenchShortName  string\n\tAlpha2Code       string\n\tAlpha3Code       string\n\tNumeric          string\n}\n```\nISO3166Entry stores country codes\n\n```go\ntype Iterator func(interface{}, int)\n```\nIterator is the function that accepts element of slice/array and its index\n\n```go\ntype ParamValidator func(str string, params ...string) bool\n```\nParamValidator is a wrapper for validator functions that accepts additional parameters.\n\n```go\ntype ResultIterator func(interface{}, int) interface{}\n```\nResultIterator is the function that accepts element of slice/array and its index and returns any result\n\n```go\ntype UnsupportedTypeError struct {\n\tType reflect.Type\n}\n```\nUnsupportedTypeError is a wrapper for reflect.Type\n\n```go\nfunc (e *UnsupportedTypeError) Error() string\n```\nError returns string equivalent for reflect.Type\n\n```go\ntype Validator func(str string) bool\n```\nValidator is a wrapper for a validator function that returns bool and accepts string.\n\n","path":"github.com/reactima/echo-bind-validate/validator","name":"govalidator","synopsis":"Package govalidator is package of validators and sanitizers for strings, structs and collections.","isRedistributable":true}
