Skip to content
Back to skills

Regle Rules

ASecurity

Regle validation rules — built-in rules from `@regle/rules`, custom rules with `createRule`, rule wrappers (`withMessage`, `withParams`, `withAsync`, `withTooltip`), and rule operators (`and`, `or`, `xor`, `not`, `applyIf`, `assignIf`, `pipe`). Use when declaring, customizing, composing, or conditionally applying validation rules in a Regle form. For form setup see regle.

  • 520 stars
  • 0 votes
  • 0 copies
  • 8 views
  • Added August 31, 2026
developmenttypescriptreactvue

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned December 3, 2026

npx -y skills add victorgarciaesgi/regle --skill regle-rules --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Regle Rules?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Regle Rules
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/victorgarciaesgi-regle-rules/badge)](https://www.skillsdirectory.com/skills/victorgarciaesgi-regle-rules)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: regle-rules
description: Regle validation rules — built-in rules from `@regle/rules`, custom rules with `createRule`, rule wrappers (`withMessage`, `withParams`, `withAsync`, `withTooltip`), and rule operators (`and`, `or`, `xor`, `not`, `applyIf`, `assignIf`, `pipe`). Use when declaring, customizing, composing, or conditionally applying validation rules in a Regle form. For form setup see regle.
license: MIT
compatibility: Requires Vue 3.5+ and TypeScript 5.1+. Works with any agent supporting the Agent Skills spec.
metadata:
  author: Victor Garcia
  version: "1.27.0"
  source: https://reglejs.dev
---

# Regle Rules

Validation rules for Regle. Rules come from `@regle/rules`, but you can also write your own with `createRule`, customize them with wrappers, and combine them with operators.

```ts
import { useRegle } from '@regle/core';
import { required, email, minLength } from '@regle/rules';

const { r$ } = useRegle(
  { email: '' },
  { email: { required, email, minLength: minLength(5) } }
);
```

## Key Concepts

- All rules are optional by default; add `required` to enforce a field.
- Built-in rules are imported from `@regle/rules`; some are factories that take parameters (e.g. `minLength(3)`).
- Custom rules use `createRule` for reusability, or an inline function for one-offs.
- Wrappers adapt an existing rule (message, params, async, tooltip) without rewriting it.
- Operators combine or conditionally apply rules.

## References

| Topic | Description | Reference |
|-------|-------------|-----------|
| Built-in Rules | All validation rules from `@regle/rules` | [rules-built-in](references/rules-built-in.md) |
| Custom Rules | Inline rules, `createRule`, reactive parameters, async rules, metadata | [rules-custom](references/rules-custom.md) |
| Rule Wrappers | `withMessage`, `withParams`, `withAsync`, `withTooltip`, chaining | [rules-wrappers](references/rules-wrappers.md) |
| Rule Operators | `and`, `or`, `xor`, `not`, `applyIf`, `assignIf`, `pipe` | [rules-operators](references/rules-operators.md) |

## Related skills

- **regle** — form setup with `useRegle`, validation properties, displaying errors, modifiers.
- **regle-typescript** — typing rules schemas with `inferRules` and `RegleComputedRules`.

Files in this skill

  • SKILL.md2.2 KB
  • references/rules-built-in.md5 KB
  • references/rules-custom.md3.2 KB
  • references/rules-operators.md2.3 KB
  • references/rules-wrappers.md2.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.