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
- โ Typescript first
- ๐ค 100% type inference
- ๐ Model based validation
- ๐ฆธโโ๏ธ Zod support
- ๐ชถ Light (~6kb gzip)
- ๐ Collection validation
TODO
- <script xmlns=""/> Vue 3.1+
- Nuxt 3
- <script xmlns=""/> Pinia
- Async rules
- resetAll
- validateState typesafe
- Deep nested rules
- Collection validation
-
applyIf
helper (like requiredIf for any rule) - Async with params (need deps array) (withAsync)
- Options (lazy, rewardEarly, autoDirty)
- Regex helper
- Additional rules and "and" helper
- "or" and "not" helper
- externalErrors
- Dates built-in rule
- Usable Metadata
- Zod support
- Per field validation option (lazy, debounce, etc...)
- Logo
- $silentErrors
- Validation groups
- Documentation (in progress)
- Unit tests (in progress)
- E2E tests (in progress)
- Nuxt Module
- withErrorType
- Issue template
-
Valibot
support - TS docs
- Typed plugin system (like scrollToError)
pnpm install @regle/core @regle/rules
# or
yarn add @regle/core @regle/rules
# or
npm install @regle/core @regle/rules