@dnervin/utils

1.0.1 • Public • Published

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 johnDoe123@mail.com.
  • validatePhoneNumber: Validates a phone number based on REGEX pattern and returns an error if the phone number is invalid. A valid phone number looks like 123-456-7890.
  • validateBirthday: Validates a birthday based on REGEX pattern and returns an error if the birthday is invalid. A valid birthday looks like 01/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 like password12!.

Readme

Keywords

Package Sidebar

Install

npm i @dnervin/utils

Weekly Downloads

0

Version

1.0.1

License

ISC

Unpacked Size

2.64 kB

Total Files

7

Last publish

Collaborators

  • dnervin