Skip to content

Commit a0faae9

Browse files
authored
fix/1500:Update Sierra Leone currency code from SLL to SLE (#1501)
## Fixes Or Enhances ``` The currency code SLL refers to the old Sierra Leonean leone. As of 2022, the leone was redenominated — the new leone now has the code Sierra Leonean leone (new) (SLE). Numeric code: 925 ``` **Make sure that you've checked the boxes below before you submit PR:** - [x] Tests exist or have been written that cover this particular change. @go-playground/validator-maintainers
1 parent d1aac1a commit a0faae9

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

currency_codes.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ var iso4217 = map[string]struct{}{
2727
"OMR": {}, "PKR": {}, "PAB": {}, "PGK": {}, "PYG": {},
2828
"PEN": {}, "PHP": {}, "PLN": {}, "QAR": {}, "RON": {},
2929
"RUB": {}, "RWF": {}, "SHP": {}, "WST": {}, "STN": {},
30-
"SAR": {}, "RSD": {}, "SCR": {}, "SLL": {}, "SGD": {},
30+
"SAR": {}, "RSD": {}, "SCR": {}, "SLE": {}, "SGD": {},
3131
"XSU": {}, "SBD": {}, "SOS": {}, "SSP": {}, "LKR": {},
3232
"SDG": {}, "SRD": {}, "SEK": {}, "CHE": {}, "CHW": {},
3333
"SYP": {}, "TWD": {}, "TJS": {}, "TZS": {}, "THB": {},
@@ -59,7 +59,7 @@ var iso4217_numeric = map[int]struct{}{
5959
532: {}, 533: {}, 548: {}, 554: {}, 558: {},
6060
566: {}, 578: {}, 586: {}, 590: {}, 598: {},
6161
600: {}, 604: {}, 608: {}, 634: {}, 643: {},
62-
646: {}, 654: {}, 682: {}, 690: {}, 694: {},
62+
646: {}, 654: {}, 682: {}, 690: {}, 925: {},
6363
702: {}, 704: {}, 706: {}, 710: {}, 728: {},
6464
748: {}, 752: {}, 756: {}, 760: {}, 764: {},
6565
776: {}, 780: {}, 784: {}, 788: {}, 800: {},

validator_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13058,6 +13058,8 @@ func TestIsIso4217Validation(t *testing.T) {
1305813058
{"TRY", true},
1305913059
{"EUR", true},
1306013060
{"USA", false},
13061+
{"SLE", true},
13062+
{"SLL", false},
1306113063
}
1306213064

1306313065
validate := New()
@@ -13085,6 +13087,8 @@ func TestIsIso4217NumericValidation(t *testing.T) {
1308513087
{8, true},
1308613088
{12, true},
1308713089
{13, false},
13090+
{925, true},
13091+
{694, false},
1308813092
}
1308913093

1309013094
validate := New()

0 commit comments

Comments
 (0)