Skip to content
This repository was archived by the owner on Oct 20, 2021. It is now read-only.

Commit 668486d

Browse files
feat(country-code): Search country name
1 parent 0bc958b commit 668486d

3 files changed

Lines changed: 260 additions & 253 deletions

File tree

docs/country-code.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ validator.countryCode().validate('BR');
99
validator.countryCode('alpha-2').validate('BR');
1010
validator.countryCode('alpha-3').validate('BRA');
1111
validator.countryCode('numeric').validate('076');
12+
validator.countryCode('name').validate('Brazil');
1213
```
1314

1415
Invalid values:
@@ -18,10 +19,12 @@ validator.countryCode().validate('foo');
1819
validator.countryCode('alpha-2').validate('076');
1920
validator.countryCode('alpha-3').validate('BR');
2021
validator.countryCode('numeric').validate('BRA');
22+
validator.countryCode('name').validate('foobar');
2123
```
2224

2325
You can choose between:
2426

2527
- alpha-2
2628
- alpha-3
2729
- numeric
30+
- name

0 commit comments

Comments
 (0)