Enum form_checker::Rule [] [src]

pub enum Rule {
    Max(i64),
    Min(i64),
    Format(&'static str),
    Lambda(Box<Fn(FieldValue) -> bool>, Option<Box<Fn(&str, &str, &str) -> String>>),
}

This enum offers rules avalable to be applied to a FieldValue.

Note that for diffent FieldValue, the same rule might mean diffent. For example, Max means the maximum length for str value, but means the maximum value for integer value.

Variants

Maximum limit.

Mininum limit.

A regex pattern to match against the str representation of FieldValue.

A customized lambda, to let you offer your own check logic.