Documentation / Forms / Forms
Forms
- Overview
- Form extraction —
request.form("name") - 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 built from the request by request.form("name"), which names them and only fills (and CSRF-checks) the one the request sends back. ValidationForm::try_form validates it when it was submitted (formats through the validator crate, password hashing per the PasswordConfig); a validated entity form is then written with save / delete.