Skip to main content

QueryInput

Trait QueryInput 

Source
pub trait QueryInput: Validate { }
Expand description

A struct that can be read from a request’s query string with Query or Request::query.

Mark a struct with #[laravel::query] to implement this trait together with Deserialize and Validate. Fields with a fallback (Option<T>, Sometimes<T>, #[default], #[default = expr], or #[serde(default)]) are lenient: missing, blank, or invalid values fall back to None, Missing, or their default. Fields without a fallback are required and fail with 400 Bad Request when missing or invalid.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§