Skip to content

Postal code validation incomplete #31

@karptonite

Description

@karptonite

The postal code patterns for subdivisions only looks for a partial match, however, if there is a subdivision postal code pattern, the country postal code pattern is not checked.

This means that any string that contains a subset of the subdivision postal code pattern tests as valid, even if the string is the wrong format otherwise.

Unfortunately, it appears that some countries (China/Taiwan) do not have a consistent country-wide postal code format, so just applying the country format in addition to the subdivision format test will not fix the issue. I'm not sure what the right solution is, but it would be good if the format of a postal code were tested in addition to the subdivision string where a consistent format is available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions