Welcome to Veli Official Doc
Zero-dependency form validation using HTML attributes
Veli is a lightweight, powerful form validation library that requires no dependencies. Validate forms using simple HTML attributes and get started in seconds.
Key Features
- Zero Dependencies - Pure JavaScript, no bloat
- Simple API - Use HTML attributes for validation
- Lightweight - Less than 50KB minified
- Flexible - Works with any form framework
- Extensible - Custom validators supported
- Accessible - Full ARIA support
- Security Scanner - Advanced threat detection (SQL Injection, XSS, NoSQL, Path Traversal, Token Leakage)
Quick Start
<form id="myForm" data-veli-design="classic">
<div class="veli-field-wrapper">
<label>Name</label>
<input
type="text"
name="username"
data-veli-rules='{"type":"text", "name":"username", "minChar":"3", "required":"true"}'
/>
<span class="veli-error"></span>
</div>
<button type="submit">Submit</button>
</form>
Explore
- Getting Started - Installation and basic setup
- Field Types - All available validation types
- Try It Out - Interactive code editor
- Examples - Real-world examples
- API Reference - Complete API documentation
- Security Scanner - Advanced threat detection & input sanitization
Supported Validations
- Email validation
- Phone number validation with country support
- Password strength checking
- Text field validation
- Checkbox validation
- Number validation
- Custom validation rules
Get Started
Choose where you want to start:
- New to Veli? Start with Getting Started
- Want to explore? Check out Examples
- Ready to code? Jump to Try It Out