@dnervin/utils
v1.0.1
Published
Express middlewares
Downloads
6
Readme
Express Validation Middlewares
This package provides a set of validation middlewares for Express.js. It includes:
validateEmail: Validates an email address based on REGEX pattern and returns an error if the email is invalid. A valid email address looks like[email protected].validatePhoneNumber: Validates a phone number based on REGEX pattern and returns an error if the phone number is invalid. A valid phone number looks like123-456-7890.validateBirthday: Validates a birthday based on REGEX pattern and returns an error if the birthday is invalid. A valid birthday looks like01/01/2000.validatePassword: Validates a password based on REGEX pattern and returns an error if the password is invalid. A valid password must be at least 8 characters (letters, numbers, or special) long. A valid password looks likepassword12!.
