regle-schemas
/regle-schemas
Waliduje formularze Regle za pomocą bibliotek schematów (Zod, Valibot, ArkType) przez useRegleSchema, useRules i refineRules.
- Autor
- victorgarciaesgi ↗
- Repozytorium
- regle ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 13.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 3
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 1
Brak sygnałów. Repozytorium zmienione 13.10.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Waliduje formularze Regle za pomocą bibliotek schematów (Zod, Valibot, ArkType) przez useRegleSchema, useRules i refineRules.
Oryginalny opis (EN)
Validate Regle forms with schema libraries via `@regle/schemas` — Zod, Valibot, ArkType, and any Standard Schema spec library using `useRegleSchema`, `useRules`, `refineRules`, and `InferInput`. Use when a form's validation is defined by an external schema instead of `@regle/rules`. For native rules see regle-rules; for form setup see regle.
Jak działa
- Key Concepts
- References
- Related skills
Podgląd SKILL.md
---
name: regle-schemas
description: Validate Regle forms with schema libraries via `@regle/schemas` — Zod, Valibot, ArkType, and any Standard Schema spec library using `useRegleSchema`, `useRules`, `refineRules`, and `InferInput`. Use when a form's validation is defined by an external schema instead of `@regle/rules`. For native rules see regle-rules; for form setup see regle.
license: MIT
compatibility: Requires Vue 3.3+, TypeScript 5.1+, and `@regle/schemas`. Works with any agent supporting the Agent Skills spec.
metadata:
author: Victor Garcia
version: "1.27.0"
source: https://reglejs.dev
---
# Regle Schemas
Regle can drive validation from a schema library instead of `@regle/rules`. Install `@regle/schemas` and use `useRegleSchema` with a Zod, Valibot, or ArkType schema (or any Standard Schema compliant validator).
```ts
import { useRegleSchema } from '@regle/schemas';
import { z } from 'zod';
const { r$ } = useRegleSchema(
{ email: '' },
z.object({ email: z.string().email() })
);
```
## Key Concepts
- `useRegleSchema(state, schema)` replaces `useRegle`; the `r$` object behaves the same.
- Works with any Standard Schema library; Zod, Valibot, and ArkType are first-class.
- `useRules` / `refineRules` let you mix schema validation with native Regle rules.
- `InferInput` infers the state type from the schema.
## References
| Topic | Description | Reference |
|-------|-------------|-----------|
| Schema Libraries | `useRegleSchema` with Zod, Valibot, ArkType | [schemas-libraries](references/schemas-libraries.md) |
| Standard Schema | Standard Schema spec, `useRules`, `refineRules`, `InferInput` | [schemas-standard-schema](references/schemas-standard-schema.md) |
## Related skills
- **regle** — form setup with `useRegle`, validation properties, displaying errors.
- **regle-rules** — native rules when not using a schema library.
- **regle-typescript** — type-safe output and typing props.
Pliki w paczce (3)
- SKILL.md 2 KB
- references/schemas-libraries.md 2 KB
- references/schemas-standard-schema.md 2 KB
Wersje
W bazie nie ma innych skilli o nazwie regle-schemas.
Migawka bazy z 13.11.2026 · wersja paczki ceb0635c13b3 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Podobne skille
- 100regle-rules
Obsługuje reguły walidacji Regle: wbudowane reguły z @regle/rules, własne reguły przez createRule, wrappery typu withMessage oraz operatory and, or, not i pipe. - 90regle-advanced
Pokazuje wzorce walidacji formularzy w Regle: tablice pól, reguły asynchroniczne, błędy z serwera i formularze wariantowe. - 95valibot
Pomaga walidować dane schematami w Valibot, lekkiej i bezpiecznej typowo bibliotece, także przy migracji z Zod. - 100mantine-form
Buduje formularze z @mantine/form: useForm, reguły walidacji, walidacja schematem (zod, valibot, arktype) lub asynchroniczna, pola zagnieżdżone, createFormContext, tryby kontrolowany i niekontrolowany oraz useField. - 100arktype
Definiuje typy walidowane w runtime przez ArkType: definicje typów, walidację, morphy (transformacje), scope'y oraz porównanie z Zod. - 90zod
Stosuje konwencje projektu Esposter przy pisaniu schematów Zod: kształt schematu, parsowanie na granicach systemu i ograniczenia wartości.