commit
2c0d3f7fe4
@ -0,0 +1,79 @@ |
|||||||
|
package validator |
||||||
|
|
||||||
|
var iso4217 = map[string]bool{ |
||||||
|
"AFN": true, "EUR": true, "ALL": true, "DZD": true, "USD": true, |
||||||
|
"AOA": true, "XCD": true, "ARS": true, "AMD": true, "AWG": true, |
||||||
|
"AUD": true, "AZN": true, "BSD": true, "BHD": true, "BDT": true, |
||||||
|
"BBD": true, "BYN": true, "BZD": true, "XOF": true, "BMD": true, |
||||||
|
"INR": true, "BTN": true, "BOB": true, "BOV": true, "BAM": true, |
||||||
|
"BWP": true, "NOK": true, "BRL": true, "BND": true, "BGN": true, |
||||||
|
"BIF": true, "CVE": true, "KHR": true, "XAF": true, "CAD": true, |
||||||
|
"KYD": true, "CLP": true, "CLF": true, "CNY": true, "COP": true, |
||||||
|
"COU": true, "KMF": true, "CDF": true, "NZD": true, "CRC": true, |
||||||
|
"HRK": true, "CUP": true, "CUC": true, "ANG": true, "CZK": true, |
||||||
|
"DKK": true, "DJF": true, "DOP": true, "EGP": true, "SVC": true, |
||||||
|
"ERN": true, "SZL": true, "ETB": true, "FKP": true, "FJD": true, |
||||||
|
"XPF": true, "GMD": true, "GEL": true, "GHS": true, "GIP": true, |
||||||
|
"GTQ": true, "GBP": true, "GNF": true, "GYD": true, "HTG": true, |
||||||
|
"HNL": true, "HKD": true, "HUF": true, "ISK": true, "IDR": true, |
||||||
|
"XDR": true, "IRR": true, "IQD": true, "ILS": true, "JMD": true, |
||||||
|
"JPY": true, "JOD": true, "KZT": true, "KES": true, "KPW": true, |
||||||
|
"KRW": true, "KWD": true, "KGS": true, "LAK": true, "LBP": true, |
||||||
|
"LSL": true, "ZAR": true, "LRD": true, "LYD": true, "CHF": true, |
||||||
|
"MOP": true, "MKD": true, "MGA": true, "MWK": true, "MYR": true, |
||||||
|
"MVR": true, "MRU": true, "MUR": true, "XUA": true, "MXN": true, |
||||||
|
"MXV": true, "MDL": true, "MNT": true, "MAD": true, "MZN": true, |
||||||
|
"MMK": true, "NAD": true, "NPR": true, "NIO": true, "NGN": true, |
||||||
|
"OMR": true, "PKR": true, "PAB": true, "PGK": true, "PYG": true, |
||||||
|
"PEN": true, "PHP": true, "PLN": true, "QAR": true, "RON": true, |
||||||
|
"RUB": true, "RWF": true, "SHP": true, "WST": true, "STN": true, |
||||||
|
"SAR": true, "RSD": true, "SCR": true, "SLL": true, "SGD": true, |
||||||
|
"XSU": true, "SBD": true, "SOS": true, "SSP": true, "LKR": true, |
||||||
|
"SDG": true, "SRD": true, "SEK": true, "CHE": true, "CHW": true, |
||||||
|
"SYP": true, "TWD": true, "TJS": true, "TZS": true, "THB": true, |
||||||
|
"TOP": true, "TTD": true, "TND": true, "TRY": true, "TMT": true, |
||||||
|
"UGX": true, "UAH": true, "AED": true, "USN": true, "UYU": true, |
||||||
|
"UYI": true, "UYW": true, "UZS": true, "VUV": true, "VES": true, |
||||||
|
"VND": true, "YER": true, "ZMW": true, "ZWL": true, "XBA": true, |
||||||
|
"XBB": true, "XBC": true, "XBD": true, "XTS": true, "XXX": true, |
||||||
|
"XAU": true, "XPD": true, "XPT": true, "XAG": true, |
||||||
|
} |
||||||
|
|
||||||
|
var iso4217_numeric = map[int]bool{ |
||||||
|
8: true, 12: true, 32: true, 36: true, 44: true, |
||||||
|
48: true, 50: true, 51: true, 52: true, 60: true, |
||||||
|
64: true, 68: true, 72: true, 84: true, 90: true, |
||||||
|
96: true, 104: true, 108: true, 116: true, 124: true, |
||||||
|
132: true, 136: true, 144: true, 152: true, 156: true, |
||||||
|
170: true, 174: true, 188: true, 191: true, 192: true, |
||||||
|
203: true, 208: true, 214: true, 222: true, 230: true, |
||||||
|
232: true, 238: true, 242: true, 262: true, 270: true, |
||||||
|
292: true, 320: true, 324: true, 328: true, 332: true, |
||||||
|
340: true, 344: true, 348: true, 352: true, 356: true, |
||||||
|
360: true, 364: true, 368: true, 376: true, 388: true, |
||||||
|
392: true, 398: true, 400: true, 404: true, 408: true, |
||||||
|
410: true, 414: true, 417: true, 418: true, 422: true, |
||||||
|
426: true, 430: true, 434: true, 446: true, 454: true, |
||||||
|
458: true, 462: true, 480: true, 484: true, 496: true, |
||||||
|
498: true, 504: true, 512: true, 516: true, 524: true, |
||||||
|
532: true, 533: true, 548: true, 554: true, 558: true, |
||||||
|
566: true, 578: true, 586: true, 590: true, 598: true, |
||||||
|
600: true, 604: true, 608: true, 634: true, 643: true, |
||||||
|
646: true, 654: true, 682: true, 690: true, 694: true, |
||||||
|
702: true, 704: true, 706: true, 710: true, 728: true, |
||||||
|
748: true, 752: true, 756: true, 760: true, 764: true, |
||||||
|
776: true, 780: true, 784: true, 788: true, 800: true, |
||||||
|
807: true, 818: true, 826: true, 834: true, 840: true, |
||||||
|
858: true, 860: true, 882: true, 886: true, 901: true, |
||||||
|
927: true, 928: true, 929: true, 930: true, 931: true, |
||||||
|
932: true, 933: true, 934: true, 936: true, 938: true, |
||||||
|
940: true, 941: true, 943: true, 944: true, 946: true, |
||||||
|
947: true, 948: true, 949: true, 950: true, 951: true, |
||||||
|
952: true, 953: true, 955: true, 956: true, 957: true, |
||||||
|
958: true, 959: true, 960: true, 961: true, 962: true, |
||||||
|
963: true, 964: true, 965: true, 967: true, 968: true, |
||||||
|
969: true, 970: true, 971: true, 972: true, 973: true, |
||||||
|
975: true, 976: true, 977: true, 978: true, 979: true, |
||||||
|
980: true, 981: true, 984: true, 985: true, 986: true, |
||||||
|
990: true, 994: true, 997: true, 999: true, |
||||||
|
} |
@ -1,32 +1,50 @@ |
|||||||
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= |
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= |
||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= |
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= |
||||||
|
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= |
||||||
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= |
||||||
github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= |
github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= |
||||||
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= |
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= |
||||||
github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= |
github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= |
||||||
github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= |
github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= |
||||||
github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= |
github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= |
||||||
github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= |
github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= |
||||||
|
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= |
||||||
|
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= |
||||||
|
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= |
||||||
|
github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= |
||||||
|
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= |
||||||
|
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= |
||||||
|
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= |
||||||
|
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= |
||||||
github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= |
github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= |
||||||
github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= |
github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= |
||||||
|
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= |
||||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= |
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= |
||||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= |
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= |
||||||
|
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= |
||||||
|
github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8= |
||||||
|
github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= |
||||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= |
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= |
||||||
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= |
|
||||||
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= |
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= |
||||||
|
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= |
||||||
|
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= |
||||||
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97 h1:/UOmuWzQfxxo9UtlXMwuQU8CMgg1eZXqTRwkSQJWKOI= |
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97 h1:/UOmuWzQfxxo9UtlXMwuQU8CMgg1eZXqTRwkSQJWKOI= |
||||||
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= |
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= |
||||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= |
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= |
||||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
||||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= |
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= |
||||||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c h1:F1jZWGFhYfh0Ci55sIpILtKKK8p3i2/krTr0H1rg74I= |
golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069 h1:siQdpVirKtzPhKl3lZWozZraCFObP8S1v6PRp0bLrtU= |
||||||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= |
golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= |
||||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= |
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= |
||||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= |
|
||||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= |
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= |
||||||
golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= |
golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= |
||||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= |
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= |
||||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= |
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= |
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= |
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= |
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= |
||||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= |
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= |
||||||
|
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= |
||||||
|
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= |
||||||
|
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= |
||||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= |
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= |
||||||
|
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= |
||||||
|
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= |
||||||
|
Loading…
Reference in new issue