UNPKG

@deposits/validators

Version:

A collection of Fintech-specific and general-purpose validators, designed to extend popular validation libraries like Vuelidate, Zod, and yup.

10 lines (7 loc) 236 B
export const passportNumber = (value) => { // Remove any whitespace value = value.trim(); // Check if the value is an alphanumeric string with 6 to 9 characters const regex = /^[a-zA-Z0-9]{9}$/; return regex.test(value); };