Forms
- Overview
- Prisme extractor
- RuniqueForm trait
- Base structure
- Trait methods
is_valid()pipeline
- Typed conversion helpers
- Field types
- TextField, NumericField, BooleanField, ChoiceField, RadioField…
- Summary table
- Database errors
- Template rendering
- Full example & common pitfalls
Overview
Runique provides a powerful form system inspired by Django. There are two approaches:
- Manual — Define fields via the
RuniqueFormtrait. - Automatic — Derive a form from a
model!schema with#[form(...)].
Forms are automatically extracted from requests via the Prisme extractor, handle validation (including via the validator crate for emails/URLs), CSRF, Argon2 password hashing, and can be saved directly to the database.