@pknowles-fs/utils
v1.0.11
Published
### Overview The utils middlewares package provides a set of Express.js middleware functions designed to validate user input for common fields such as email, phone number, birthday, and password. It is built with the intention to streamline the process of
Downloads
5
Readme
Utils Middleware
Overview
The utils middlewares package provides a set of Express.js middleware functions designed to validate user input for common fields such as email, phone number, birthday, and password. It is built with the intention to streamline the process of ensuring that incoming data adheres to expected formats before processing user signups or other forms of data entry.
Features
- Name Validation: Checks that the input is a valid name format
- Email Validation: Checks that the input is a valid email format.
- Phone Validation: Ensures the phone number matches a specific format (XXX-XXX-XXXX).
- Birthday Validation: Ensures that the birthday is in a specific format (MM/DD/YYYY).
- Password Validation: Confirms the password meets certain criteria for security (e.g.minimum length).
Installation
To install the package, run the following command in your project directory: