Regle
Regle \ʁɛɡl\ (French word for 'rule' ) is a Typescript-first model-based form validation library for Vue 3.
It's heavily inspired by Vuelidate.
⚠️ Project is still in development, do not use it in production
API or function names can still change
📚 Documentation
🧰 Features
- ✅ Typescript first
- 🤖 100% type inference
- 📖 Model based validation
- 🦸♂️ Zod support
- 🪶 Light (~6kb gzip)
- 🛒 Collection validation
🎮 Play with it
TODO
🔌 Compatibility:
☑️ Roadmap
- [x] Async rules
- [x] resetAll
- [x] validateState typesafe
- [x] Deep nested rules
- [x] Collection validation
- [x]
applyIf
helper (like requiredIf for any rule)
- [x] Async with params (need deps array) (withAsync)
- [x] Options (lazy, rewardEarly, autoDirty)
- [x] Regex helper
- [x] Additional rules and "and" helper
- [x] "or" and "not" helper
- [x] externalErrors
- [x] Dates built-in rule
- [x] Usable Metadata
- [x] Zod support
- [x] Per field validation option (lazy, debounce, etc...)
- [x] Logo
- [x] $silentErrors
- [x] Validation groups
- [ ] Documentation (in progress)
- [ ] Unit tests (in progress)
- [ ] E2E tests (in progress)
- [ ] Nuxt Module
- [ ] withErrorType
- [ ] Issue template
- [ ]
Valibot
support
- [ ] TS docs
Maybe in roadmap
- [ ] Typed plugin system (like scrollToError)
Quick install
pnpm install @regle/core @regle/rules
# or
yarn add @regle/core @regle/rules
# or
npm install @regle/core @regle/rules
📑 License
MIT License