Expand description
FormRequest validation: rule-checking functions and the Laravel-shaped
ValidationErrors response. #[derive(FormRequest)] (in
larust-macros) generates a per-struct impl axum::extract::FromRequest
that calls into rules::* and builds a ValidationErrors on failure -
generated per struct (not a blanket impl here) because Rust’s orphan
rule forbids implementing a foreign trait like FromRequest over a
generic type parameter from this crate.
Re-exports§
pub use form_urlencoded;
Modules§
- rules
- Rule-checking functions operate on the raw (possibly-absent) string
value for a field and return
Some(message)on failure. Each rule is independent, matching Laravel’s rule composition: an absent value doesn’t triggeremail/length- onlyrequiredcares about absence.
Structs§
- Validation
Errors - Laravel-shaped validation error bag: field name -> messages.