Skip to Content
NFSFU234FormValidation v3 is here — file upload validation, config-driven rules, and more.

isZIP

The isZIP function validates whether a given value is a valid ZIP code.

Works in: HTML5, React JS, Node.js

ParameterTypeDefaultDescription
zipCodestring | numberundefinedThe value to validate as a ZIP code.

Usage

Example: Validate ZIP Code

const zipCode = '12345'; const isValidZIP = nfsfu234FormValidation.isZIP(zipCode); console.log(isValidZIP); // true

See also

Last updated on