Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ojsdude committed Mar 3, 2021
1 parent 8d94f62 commit 5e124a6
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,23 @@ ValidatesZipcode.format('Sw1A 2aA', 'FR')

At the moment not every country is supported. See [lib/validates_zipcode/formatter.rb](lib/validates_zipcode/formatter.rb) to find all available countries.

### Test data

In order to generate test data, we suggest using the [regexp-examples gem](https://github.com/tom-lord/regexp-examples)
This dependency will allow you to create examples as follows:

```ruby
require "regexp-examples"

ValidatesZipcode::CldrRegexpCollection::ZIPCODES_REGEX[:ES].examples

# => ["00000", "00001", "00002", "00003", ..., "44443", "44444"]

ValidatesZipcode::CldrRegexpCollection::ZIPCODES_REGEX[:ES].random_example

# => "27072"
```

## Contributing

1. Fork it
Expand Down

0 comments on commit 5e124a6

Please sign in to comment.