stricte / PostalCodeValidator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PostalCodeValidator

Based on PHP version https://github.com/sirprize/postal-code-validator

Usage

Check if we have mask defined for specific country

 PostalCodeValidatorJs.hasCountry('PL') //returns boolean

Check if given postal code is valid

 PostalCodeValidatorJs.isValid('80-210', 'PL') //returns boolean

Formatting

  • # = 0-9
  • @ = a-zA-Z
  • * = a-zA-Z0-9

Country Codes

Postal-code-validator uses ISO 3166 2-letter country codes

License

See LICENSE.

About

License:MIT License


Languages

Language:JavaScript 100.0%