Skip to content

Latest commit

 

History

History
186 lines (130 loc) · 8.71 KB

Bootstrap Form Validation Examples.md

File metadata and controls

186 lines (130 loc) · 8.71 KB

📝 JavaScript Bootstrap Form Validation


Version Bootstrap License Size


⚡ A lightweight, dependency-free form validation library for Bootstrap 5

🎯 Real-Time Feedback • ♿ Fully Accessible • 🎨 Zero-Styling Conflicts • 🌐 i18n Ready


Try It Live    Download    Docs

🌟 About

JavaScript Bootstrap Form Validation is a modern, dependency-free validation library that seamlessly integrates with Bootstrap 5. It brings beautiful, accessible, and instant form feedback to any web project — without the bloat of heavy frameworks or messy configuration.

Just add data-validate to your form, and you're done. It's that simple.

💡 Perfect for: SaaS signups, contact forms, checkout flows, admin panels — any form where user experience matters.

🎯 Validation Features

✅ 40+ Rules 🎨 Bootstrap Native ♿ Accessible
Email, phone, URL,
password strength & more
Inherits Bootstrap
styles perfectly
ARIA-compliant
error messages
🌐 i18n Support 🔌 Custom Rules 📦 Tiny Footprint
15+ built-in
languages
Register your own
validators easily
Under 5kb
minified + gzip

🏆 Why This Library

💎 Advantage 📝 Description
⚡ Zero Dependencies Pure vanilla JS — no jQuery, no framework, no bloat
🎨 Bootstrap-Native Works with Bootstrap, not against it — no CSS conflicts ever
♿ WCAG 2.1 AA Screen-reader tested, keyboard navigation, focus management built-in
🚀 Instant Feedback Validates on blur, keystroke & submit — no waiting for page reloads
🧩 Extensible Register custom rules in 3 lines of code
🌍 Global-Ready Ready for international forms with automatic RTL support

🎬 Live Preview

╔══════════════════════════════════════════════════╗
║  📝  Sign Up Form                                ║
╠══════════════════════════════════════════════════╣
║                                                  ║
║  Email                                           ║
║  ┌────────────────────────────────────────────┐  ║
║  │ john@example.com                       ✅  │  ║
║  └────────────────────────────────────────────┘  ║
║                                                  ║
║  Password                                        ║
║  ┌────────────────────────────────────────────┐  ║
║  │ ••••••••••••                           ✅  │  ║
║  └────────────────────────────────────────────┘  ║
║  ✓ 12+ characters  ✓ Uppercase  ✓ Symbol        ║
║                                                  ║
║  Confirm Password                                ║
║  ┌────────────────────────────────────────────┐  ║
║  │ •••••••                                 ❌  │  ║
║  └────────────────────────────────────────────┘  ║
║  ⚠️ Passwords do not match                       ║
║                                                  ║
║           [ Create Account ]                     ║
╚══════════════════════════════════════════════════╝

🧩 Project Structure

📝 js-bootstrap-form-validation/
├── 🎯 src/
│   ├── validator.js           # Core validation engine
│   ├── rules/                 # Built-in rules
│   │   ├── email.js
│   │   ├── password.js
│   │   └── phone.js
│   └── ui/                    # Bootstrap feedback binding
├── 🌐 i18n/                   # 15+ language packs
├── 🎨 themes/                 # Optional visual presets
├── 🧪 tests/                  # Vitest unit + Playwright e2e
└── 📖 docs/                   # Live playground & guides

🛠️ Tech Stack

JavaScript Bootstrap HTML5 Vitest Playwright

🤝 Community

Found a bug? Want a new rule? Have a translation to share?

📜 License

Distributed under the MIT License. See LICENSE for details.


⚡ Made with 📝 by the Form Validation Team

If this library saves you time — drop a star!