I am trying to develop an application that accepts a postal code from a form. The form is accessible worldwide. I know that for US zip codes the standard character length is 5, but what is the min and max for non-US postal codes? I need to know because I am using a validation constraint:
/**
* The zip code used to retrieve a US based customer's state.
*/
@Nullable
@Size(min=5, max=5)
private final String zip;
This question was marked as a duplicate because of this post: I need to store postal codes in a database. How big should the column be?. Which doesn't specify the minimum for all non-US postal codes.