[][src]Trait form_validation::Validation

pub trait Validation<Value, Key> {
    fn validate_value(
        &self,
        value: &Value,
        key: &Key
    ) -> Result<(), ValidationErrors<Key>>; }

A function/struct/item that can perform validation on an item with a given Value type.

Required methods

fn validate_value(
    &self,
    value: &Value,
    key: &Key
) -> Result<(), ValidationErrors<Key>>

Validate a given form field referenced by a given Key, that contains a given Value, returns ValidationErrors if there are any.

Loading content...

Implementors

impl<Value, Key> Validation<Value, Key> for Validator<Value, Key> where
    Key: PartialEq + Clone
[src]

impl<Value, Key> Validation<Value, Key> for ValidatorFn<Value, Key> where
    Key: Clone + PartialEq
[src]

Loading content...