https://github.com/imankii01/form-genius
Form-Genius is an AI-powered form validation library for Node.js that provides unlimited, dynamic, and customizable validation rules.
https://github.com/imankii01/form-genius
ai-powered-corrections custom-validation-rules multi-language-suppor
Last synced: 4 months ago
JSON representation
Form-Genius is an AI-powered form validation library for Node.js that provides unlimited, dynamic, and customizable validation rules.
- Host: GitHub
- URL: https://github.com/imankii01/form-genius
- Owner: imankii01
- License: mit
- Created: 2025-02-10T15:18:13.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-10T15:25:44.000Z (over 1 year ago)
- Last Synced: 2025-09-27T17:17:28.464Z (8 months ago)
- Topics: ai-powered-corrections, custom-validation-rules, multi-language-suppor
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/form-genius
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# **Form-Genius 🚀**
**AI-Powered Dynamic Form Validator for Node.js**




**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**
```sh
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**
```javascript
const validateForm = require("form-genius");
const userData = {
email: "john.doe@gmal.com",
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**
```json
{
"valid": false,
"errors": {
"password": "Password must be at least 8 characters",
"website": "Invalid URL format",
"age": "Must be at least 18"
},
"suggestions": {
"email": "john.doe@gmail.com",
"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.
```javascript
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! ☕
[](https://www.buymeacoffee.com/imankii01)
---
## 🔒 **License**
This project is licensed under the **MIT License**. See the full **[LICENSE](./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