Struct form_checker::Checker
[−]
[src]
pub struct Checker<T: FieldType> { /* fields omitted */ }
The checker for a field.
Methods
impl<T: FieldType> Checker<T>
[src]
fn new(field_name: &str, field_title: &str, field_type: T) -> Checker<T>
Construct a new Checker
.
field_name is the field name in the form.
field_title is a descriptive value, used to diplay error messages.
field_type is a type implementing the FieldType
trait.
fn meet(self, rule: Rule) -> Checker<T>
Add a rule to this checker, refer to the Rule
.
fn set(self, option: CheckerOption) -> Checker<T>
Set an option for this checker, refer to the CheckerOption
.