Skip to content

0.2.0

Choose a tag to compare

@BenMorel BenMorel released this 26 Jan 15:54

✨ All countries are now supported!

💥 Breaking changes in PostcodeFormatter

  • formatPostcode() has been renamed to format().
  • isValidPostcode() has been removed; the rationale behind this is that one should not just validate a postcode, but replace it with its formatted counterpart as well.
  • The $cleanup parameter has been removed from format(). The postcode is now always cleaned up, but only from possible separators: spaces and dashes.

💥 Other changes

  • Country postcode formatter implementations are now suffixed with Formatter, to prevent PHP syntax errors for some country codes.