validateCep function checks if a Brazilian ZIP code is valid. A valid ZIP code must contain 8 numeric digits. The function removes non-numeric characters before validation.ts
import { validateCep } from "@arkyn/shared";
string): The ZIP code string, which can contain formatting (e.g., "12345-678").boolean): Returns true if the ZIP code is valid, otherwise false.ts
import { validateCep } from "./validateCep";validateCep("12345-678"); // truevalidateCep("12345678"); // truevalidateCep("ABCDE-123"); // false