Skip to main content

Input

Derive Macro Input 

Source
#[derive(Input)]
{
    // Attributes available to this derive:
    #[sofie]
    #[input]
    #[min]
    #[max]
    #[length]
    #[range]
    #[required]
    #[unique]
    #[unconstrained]
}
Expand description

#[min(n)]/#[max(n)] bound text characters or a number’s value; #[length(min, max)], #[range(min, max)], #[required] (not blank) and #[unique] (held by the database only). #[input(from = Order)] inherits Order’s field constraints, #[unconstrained] drops them; #[input(validate)] runs Validate after them.