Forms
- Overview
- Form extraction β
request.form() - 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 request.form(), handle validation (including via the validator crate for emails/URLs), CSRF, Argon2 password hashing, and can be saved directly to the database.