data-validators-js is an open-source package that provides a comprehensive set of data validators for JavaScript. It simplifies data validation, ensuring data integrity in applications by offering robust, flexible, and customizable validation functions.
- Versatile Validators: Supports common data types such as strings, numbers, arrays, and more.
- Custom Validation Rules: Easily define and apply validation rules tailored to your needs.
- Chaining Validators: Combine multiple validators for complex validation scenarios.
- Error Handling: Provides detailed error messages for easier debugging.
Install the package using npm:
npm install data-validators-jsImport the package and use its validators:
const { inputValidators } = require("data-validators-js");
console.log(inputValidators.isValidateEmail("abs@gmail.com")); // true
console.log(inputValidators.isValidNumber("23d")); // falseWe welcome contributions! If you'd like to improve this package, follow these steps:
- Fork the repository on GitHub.
- Clone your fork:
git clone https://github.com/your-username/data-validators-js.git
- Create a new branch:
git checkout -b feature-new-validator
- Make your changes and commit:
git commit -m "Added new validator for XYZ" - Push to your branch:
git push origin feature-new-validator
- Create a Pull Request on GitHub.
If you encounter any issues, feel free to open an issue on GitHub. We appreciate feedback and suggestions for improvements.
This project is licensed under the MIT License.
Happy coding! 🚀