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 πŸ™

Β© 2026 – Pkg Stats / Ryan Hefner

form-genius

v1.0.0

Published

πŸš€ AI-powered, dynamic, and customizable form validation for Node.js. Supports unlimited fields, auto-detection, real-time validation, and AI-based corrections.

Readme

Form-Genius πŸš€

AI-Powered Dynamic Form Validator for Node.js

npm
License
Build
Contributions

Form-Genius is an AI-powered, highly customizable, and dynamic form validation package for Node.js. It supports unlimited fields, real-time validation, AI-based auto-corrections, and customizable validation rules. Whether you're working on a simple contact form or a complex application requiring secure validation, Form-Genius is the perfect solution.


🌟 Why Use Form-Genius?

βœ… Unlimited Fields – Validate any number of fields dynamically.
βœ… AI-Powered Corrections – Suggests fixes for typos, formatting issues, and invalid inputs.
βœ… Auto Field-Type Detection – Automatically detects input type (email, phone, password, etc.).
βœ… Custom Rules Support – Define your own validation rules for full flexibility.
βœ… Real-Time Validation – Easily integrates with front-end frameworks like React, Vue, and Angular.
βœ… Multi-Language Support – Works with various languages and regional formats.
βœ… Security & Fraud Detection – AI-based algorithms prevent fake/spam submissions.
βœ… Lightweight & Fast – Designed for high-performance applications.


πŸš€ Installation

npm install form-genius

πŸ› οΈ How It Works

  1. Define your form fields.
  2. Set up validation rules for each field.
  3. Use form-genius to validate all inputs dynamically.
  4. Get real-time feedback with errors and AI-generated suggestions.

πŸ“Œ Usage Example

Basic Example

const validateForm = require("form-genius");

const userData = {
    email: "[email protected]",
    phone: "+123 456 7890",
    password: "pass",
    website: "htt://invalid-url.com",
    age: "17",
    username: "john_doe_123",
    address: "1600 Amphitheatre Pkwy, California"
};

const validationRules = {
    password: { minLength: 8 },
    website: { type: "url" }, // User-defined type override
    age: { type: "number", min: 18, max: 99 },
    address: { type: "address" }, // AI-powered address validation
    username: { type: "username", minLength: 3, maxLength: 15 }
};

console.log(validateForm(userData, validationRules));

Output Example

{
  "valid": false,
  "errors": {
    "password": "Password must be at least 8 characters",
    "website": "Invalid URL format",
    "age": "Must be at least 18"
  },
  "suggestions": {
    "email": "[email protected]",
    "website": "http://invalid-url.com"
  }
}

🎯 Supported Validations

πŸ”Ή Basic Validations

  • Required fields
  • Min/max length
  • Allowed characters

πŸ”Ή Data Type-Specific Validations

  • Email – Validate format, suggest correct domain (gmal.com β†’ gmail.com)
  • Phone Number – Auto-format numbers, detect invalid inputs
  • Password – Strength validation (uppercase, numbers, special characters)
  • Username – No spaces, supports underscores, min/max length
  • URL – Ensures valid website addresses
  • Date – Ensures correct date formats (MM-DD-YYYY, YYYY-MM-DD)
  • Number – Range validation (min, max)
  • Address – Uses Google Maps API for real-world validation

πŸ”Ή Advanced AI-Based Features

  • Contextual Text Correction – AI fixes common typos
  • Fraud Detection – Detects fake/spam submissions
  • Real-Time Validation – Perfect for frontend form validation

πŸ“¦ Integrating with Express.js (API Example)

Easily validate user input in your Express.js application.

const express = require("express");
const validateForm = require("form-genius");

const app = express();
app.use(express.json());

app.post("/register", (req, res) => {
    const validationRules = {
        email: { type: "email" },
        password: { minLength: 8 },
        username: { type: "username", minLength: 3, maxLength: 15 }
    };

    const result = validateForm(req.body, validationRules);
    
    if (!result.valid) return res.status(400).json(result);
    
    res.json({ success: true, message: "User registered successfully!" });
});

app.listen(3000, () => console.log("Server running on port 3000"));

🌍 Use Cases

βœ… E-commerce Websites – Validate shipping addresses, phone numbers, and payment details.
βœ… User Registration Forms – Secure authentication with strong passwords and valid emails.
βœ… Finance & Banking Apps – Validate account details securely.
βœ… Healthcare Applications – Ensure medical forms are properly filled.
βœ… Job Portals & Applications – Validate structured resume submissions.


βš™οΈ Versioning

Current Stable Version: 1.0.0

  • πŸŽ‰ New Features: AI-powered validation, customizable rules, auto-detection
  • πŸ”₯ Performance: Optimized for high-speed validation

πŸ”₯ Contributing

We welcome contributions! Feel free to submit issues and pull requests.

To Contribute:

  1. Fork the repository
  2. Create a new feature branch
  3. Make changes and commit
  4. Submit a pull request

πŸ’™ Support My Work

If you love Form-Genius, consider buying me a coffee! β˜•

Buy Me a Coffee


πŸ”’ License

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


πŸš€ Form-Genius makes form validation smarter, faster, and more powerful. Install it today and take your form validation to the next level! πŸ’‘# form-genius