1.0.1 • Published 1 year ago

@dnervin/utils v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

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!.
1.0.1

1 year ago

1.0.0

1 year ago