|
export function validatePostalCode(input: string) {
|
|
// Remove non-ASCII characters
|
|
// eslint-disable-next-line no-control-regex
|
|
input = input.replace(/[^\x00-\x7F]/g, "");
|
|
if (input.length < 4) {
|
|
return false;
|
|
}
|
|
const regex = /^[0-9]+$/;
|
|
return regex.test(input);
|
|
}
|