Universal Logic Engine
Execute the same validation logic on Node.js, Edge, and Browser. Powered by @ctrovalidate/core.
Isomorphic core logic. Platform-native controllers. Framework-headless hooks. Zero-dependency architecture with 100% logic coverage in v4.
Define validation rules and custom messages directly in your markup. The browser adapter orchestrates the DOM state while the core engine executes the logic.
<form id="auth-form" novalidate>
<div class="field-group">
<input
type="password"
name="user_password"
data-ctrovalidate-rules="required|minLength:8"
data-ctrovalidate-message="Password required"
data-ctrovalidate-minLength-message="Must be at least 8 characters"
/>
<div class="error-container"></div>
</div>
</form>import { Ctrovalidate } from '@ctrovalidate/browser';
// Initialize the controller
// Initialize transparently
const validator = new Ctrovalidate(
document.getElementById('auth-form'),
{ realTime: true }
);
// Programmatic trigger (Recommended)
const isValid = await validator.validate();The ecosystem provides specialized adapters for every modern development workflow.
| Package | Purpose | Documentation |
|---|---|---|
| @ctrovalidate/core | Universal validation engine (Isomorphic) | API Ref |
| @ctrovalidate/browser | DOM-based controller (Post-v3 evolution) | API Ref |
| @ctrovalidate/react | Headless Hooks for React 18+ | Reference |
| @ctrovalidate/vue | Composition API for Vue 3 | Reference |
| @ctrovalidate/svelte | Reactive Stores for Svelte | Reference |
| @ctrovalidate/next | Server Action & FormData utilities | Reference |
Restoring the standard of documentation you expect. Technical, reliable, and precise.
npm install @ctrovalidate/browser