{
  "markdown": "[npm-version-src]: https://img.shields.io/npm/v/@regle/core.svg\n[npm-version-href]: https://www.npmjs.com/package/@regle/core\n[npm-downloads-src]: https://img.shields.io/npm/dm/@regle/core.svg\n[npm-total-downloads-src]: https://img.shields.io/npm/dt/@regle/core.svg\n[npm-downloads-href]: https://www.npmjs.com/package/@regle/core\n\n<p align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/victorgarciaesgi/regle/master/.github/images/regle-github-banner.png\"\n    alt=\"regle cover\" />\n</p>\n\n<p align='center'>\n    <a href=\"https://www.npmjs.com/package/@regle/core\"><img alt=\"npm version\" src=\"https://img.shields.io/npm/v/@regle/core.svg\"/></a>\n    <a href=\"https://codecov.io/github/victorgarciaesgi/regle\"><img src=\"https://codecov.io/github/victorgarciaesgi/regle/graph/badge.svg?token=T5UV4714PB\"/></a>\n    <a href=\"https://www.npmjs.com/package/@regle/core\"><img alt=\"npm download\" src=\"https://img.shields.io/npm/dm/@regle/core.svg\"/></a>\n    <a href=\"https://www.npmjs.com/package/@regle/core\"><img alt=\"npm download\" src=\"https://img.shields.io/npm/dt/@regle/core.svg\"/></a>\n</p>\n<p align='center'>\n    <a href=\"https://www.buymeacoffee.com/victorgarco\" target=\"_blank\"><img height=\"40\" width=\"150\" src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" alt=\"Buy Me A Coffee\" style=\"height: 40px !important;width: 150px !important;\" ></a>\n</p>\n\n# Regle\n\nRegle \\ʁɛɡl\\ (French word for 'rule' ) is a headless model-based form validation library for Vue 3.\n\nIt's heavily inspired by Vuelidate and aims to replace it in modern apps.\n\n## 📚 Documentation\n\n[![Documentation](https://raw.githubusercontent.com/victorgarciaesgi/regle/refs/heads/main/.github/images/redirectDoc.svg)](https://reglejs.dev/)\n\n## 🎮 Play with it\n\n| Playground                                                                                                                                                                                           | Simple demo                                                                                                                                                                                                                                                             | Advanced Demo                                                                                                                                                                                                                                                                 |\n| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| <a target='_blank' href=\"https://play.reglejs.dev\"><img width=\"180\" src=\"https://raw.githubusercontent.com/victorgarciaesgi/regle/refs/heads/main/.github/images/regle-playground-button.svg\" /></a> | [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/~/github.com/victorgarciaesgi/regle-examples/tree/main/examples/simple-example?file=examples/simple-example/src/App.vue&configPath=examples/simple-example) | [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/~/github.com/victorgarciaesgi/regle-examples/tree/main/examples/advanced-example?file=examples/advanced-example/src/App.vue&configPath=examples/advanced-example) |\n\n## 🤖 AI Integration\n\n### MCP Server\n\n<a href=\"https://cursor.com/en-US/install-mcp?name=regle&config=eyJjb21tYW5kIjoibnB4IEByZWdsZS9tY3Atc2VydmVyIn0%3D\" alt=\"Install MCP Server\">\n  <picture>\n    <source media=\"(prefers-color-scheme: light)\" srcset=\"https://cursor.com/deeplink/mcp-install-dark.svg\">\n    <img alt=\"fallback alt='Install MCP Server\" src=\"https://cursor.com/deeplink/mcp-install-light.svg\">\n  </picture>\n</a>\n\nOr add it manually to your `.cursor/mcp.json` or `.mcp.json`\n\n```json\n{\n  \"mcpServers\": {\n    \"regle\": {\n      \"command\": \"npx\",\n      \"args\": [\"@regle/mcp-server\"]\n    }\n  }\n}\n```\n\n### Agent Skills\n\nInstall [Agent Skills](https://skills.sh/) to give your AI coding agent Regle expertise:\n\n```bash\nnpx skills add victorgarciaesgi/regle\n```\n\n\n## ✨ Features\n\n- 🔌 **Headless**: Plug any UI or markup to the validation.\n- 🎯 **Type safe**: Full inference and autocompletion support.\n- 🌳 **Model based**: Your validation tree structure matches the data model.\n- 🔍 **Devtools**: Built-in Vue devtools extention for easy debugging and testing.\n- 🤖 **MCP Server**: MCP server for easy documentation and autocomplete.\n- 🧠 **Agent Skills**: [Agent Skills](https://skills.sh/) for AI coding agents.\n- 🎨 **Style Agnostic**: Works with any CSS framework or plain CSS.\n- 📦 **Modular design**: Expand Regle properties or default validation rules.\n- 🔄 **Async validation**: Handle asynchronous validations and pending states with ease.\n- 🌐 **i18n Ready**: Works with any i18n library.\n- 📕 **Vuelidate like API**: Regle's API mimics Vuelidate's API while improving it on a lot of areas.\n- ⚡️ **SSR Ready**: Full support for Server Side Rendering environments. <img src=\"https://raw.githubusercontent.com/victorgarciaesgi/regle/master/.github/images/icons/nuxt.svg\" alt='nuxt'/>\n- ✅ **Alternative validation**: [Standard Schema](https://standardschema.dev/) spec validation support.\n  - 🦸‍♂️ [Zod](https://zod.dev/)\n  - 🤖 [Valibot](https://valibot.dev/)\n  - 🚢 [ArkType](https://arktype.io)\n\n## 🔍 Devtools\n\nRegle comes with a built-in Vue devtools extension for easy debugging and testing.\n\n![Regle Devtools Screenshot](https://reglejs.dev/screenshots/devtools.png)\n\n> 📝 For more details, see the [Devtools documentation](https://reglejs.dev/introduction/devtools).\n\n## Basic example\n\n```vue\n<template>\n  <input v-model=\"r$.$value.email\" :class=\"{ error: r$.email.$error }\" placeholder=\"Type your email\" />\n\n  <ul>\n    <li v-for=\"error of r$.email.$errors\" :key=\"error\">\n      {{ error }}\n    </li>\n  </ul>\n</template>\n\n<script setup lang=\"ts\">\n  import { useRegle } from '@regle/core';\n  import { required, minLength, email } from '@regle/rules';\n\n  const { r$ } = useRegle(\n    { email: '' },\n    {\n      email: { required, minLength: minLength(4), email },\n    }\n  );\n</script>\n```\n\n## Compatibility:\n\n- <img src=\"https://raw.githubusercontent.com/victorgarciaesgi/regle/master/.github/images/icons/vue.svg\" alt='vue'/> Vue 3.3+\n- <img src=\"https://raw.githubusercontent.com/victorgarciaesgi/regle/master/.github/images/icons/nuxt.svg\" alt='nuxt'/> Nuxt 3.1+\n- <img src=\"https://raw.githubusercontent.com/victorgarciaesgi/regle/master/.github/images/icons/pinia.svg\" alt='pinia'/> Pinia 2.2.5+\n- Standard Schemas\n  - 🦸‍♂️ Zod 3.24+\n  - 🤖 Valibot 1.0+\n  - 🚢 Arktype 2.0.0+\n\n## ⬇️ Quick install\n\n```bash\npnpm install @regle/core @regle/rules\n# or\nyarn add @regle/core @regle/rules\n# or\nnpm install @regle/core @regle/rules\n```\n\n## 🫶 Credits\n\n- [Johannes Lacourly](https://www.behance.net/johanneslaf7dc) for designing logo and banners 🪄\n- [Martins Zeltins](https://github.com/martinszeltins) who helped me identify a lot of bugs, find new features and contributed to docs.\n- [Vuelidate](https://vuelidate-next.netlify.app) Which I loved and used for 8 years, and is my main inspiration for creating Regle\n\n## 📑 License\n\n[MIT License](./LICENSE)\n",
  "bytes": 7834,
  "sha": "0676068d214344ef03aa021af5e1046c747bcb22ec9da7f1ba0203e0bcf05abd",
  "repo_slug": "victorgarciaesgi/regle",
  "fonte": "repo",
  "truncated": false,
  "api": "https://api.agentalog.com/api/listings/skl_victorgarciaesgi_regle_regle_schemas_02f9158b/readme"
}