npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

auth-validify

v1.0.4

Published

Your go-to JavaScript package for hassle-free form validation. Simplify error-checking, enhance user experience, and make your forms shine effortlessly.

Downloads

26

Readme

Auth Valdify: Powerful and Customizable Validation for Node.js

npm version

auth-validify simplifies and strengthens data validation in your Node.js applications. It provides a comprehensive set of validation functions for common data types, along with options for customization to meet your specific needs.

This library empowers you to:

  • Ensure the integrity and security of user-submitted data.
  • Prevent invalid inputs from reaching your backend logic.
  • Enhance user experience with clear and actionable error messages.

Installation

npm install auth-validify

Usage

Offer practical examples demonstrating how to use each validation function:

Usage

1. Basic Validation:

    const { validator } = require('auth-validify');

    const email = '[email protected]';
    const password = 'StrongPassword123!';

    if (validator.isEmail(email) && validator.isValidPassword(password)) {
        console.log('Valid email and password!');
    } else {
        // Provide helpful error messages
        if (!validator.isEmail(email)) {
            console.error('Invalid email format.');
        }
        if (!validator.isValidPassword(password)) {
            console.error('Password must be at least 8 characters long and contain a combination of letters, numbers, and special characters.');
        }
    }
    const { validator } = require('auth-validify');

    // Set custom password length (minimum 12 characters)
    const options = { minLength: 12 };

    if (validator.isValidPassword(password, options)) {
        console.log('Password meets custom criteria!');
    } else {
    // ... (error handling)
    }

Features and Benefits

  • Comprehensive Validation: Covers common data types like email, password, phone number, username, and URL.
  • Customizable Rules: Tailor validation criteria to your application's specific needs (e.g., minimum password length, allowed email domains).
  • Clear Error Handling: Throw informative exceptions or provide custom error messages for better debugging and user experience.
  • Asynchronous Support: Enables seamless integration with promises or async/await patterns.
  • Well-Documented: Provides detailed documentation with clear examples and API descriptions.

Contribution

We welcome contributions to improve auth-validify. Feel free to submit pull requests for bug fixes, new features, or improved documentation.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Author

Buy Me a Coffee

If you find this library helpful, consider buying me a coffee to support further development:

Buy me a coffee