✨ Formora
Formora is a tiny, headless form state and validation engine for React, built for predictable behavior, explicit rules, and real‑world forms.
Formora focuses on clarity and correctness instead of magic. Every behavior is explicit, testable, and easy to reason about.
Why Formora?
Most form bugs don’t come from missing features — they come from unclear behavior:
- when exactly should validation run?
- why is this error still here?
- why did a field suddenly become dirty?
- why did removing a field break the form state?
Formora is built to make these rules visible, predictable, and debuggable.
Core ideas
🧭 Explicit validation timing
You always know when validation runs. Choose one rule for the entire form:
submit— validate only on submit (classic forms)change— validate on every change (live feedback)blur— validate when a field loses focus (great UX)
This is controlled by the validateOn option.
🧠 Synchronous, predictable validation
Formora validation is synchronous and explicit:
- validation functions return
string | undefined - no hidden async side effects
- no race conditions
This makes validation behavior easy to understand, test, and debug.
Async validation is planned for a future release and will be documented separately.
🧩 Nested fields by default
Formora treats field names as paths, not flat strings:
user.email
profile.address.street
items.0.name
Nested objects and arrays work naturally, without special APIs.
📦 Real form state
Formora tracks form state you actually care about:
- values — current form data
- errors — validation errors
- touched — set on blur
- dirty — differs from initial values
These states are updated consistently and predictably, even when fields are added or removed.
🔁 Conditional fields that behave correctly
When a field is unmounted:
- its errors are cleared
- it no longer affects form state
No stale errors. No ghost values.
What you can do next
- 👉 Getting Started — install and build your first form
- 👉 Validation Modes — understand submit / change / blur
- 👉 Nested Fields — work with complex data safely
- 👉 API Reference — detailed hook and method docs
Philosophy
Formora prefers:
- explicit behavior over magic
- predictable state over hidden side effects
- correctness over convenience
If you value control, clarity, and long‑term maintainability, Formora is built for you.