Validator.js: Israel (IL) postal code can be 5 or 7 digits - not just 5 digits

Created on 27 Jun 2020  路  3Comments  路  Source: validatorjs/validator.js

isPostalCode only allows 5 digit postal codes for Israel (IL)

  • Currently Israel officially uses 7 digit postal codes but also still accepts 5 digit codes in practice

I'd make the PR directly but I do not have permission to create Pull Requests on this repository.

I propose modifying the existing line for IL to:
IL: /^(\d{5}|\d{7})$/,

Background on Israel postal codes; fundamentally, although officially switching to a 7 digit system in 2012 and supposedly deprecating 5 digit codes in 2013, 5 digit postal codes are still commonly used

Various references:
https://worldpostalcode.com/israel/
https://en.youbianku.com/Israel
https://www.reference.com/business-finance/zip-code-israel-168914627f8cae6
https://en.wikipedia.org/wiki/Postal_codes_in_Israel

馃悰 bug

Most helpful comment

if no ones taking it, i will do pr asap

All 3 comments

Oh sure, please do a PR.

if no ones taking it, i will do pr asap

Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rubiin picture rubiin  路  3Comments

philfreo picture philfreo  路  3Comments

malkhuzayyim picture malkhuzayyim  路  4Comments

mum-never-proud picture mum-never-proud  路  4Comments

IOAyman picture IOAyman  路  4Comments