pub trait Validation<Value, Key> {
// Required method
fn validate_value(
&self,
value: &Value,
key: &Key,
) -> Result<(), ValidationErrors<Key>>;
}
Expand description
A function/struct/item that can perform validation on an item with
a given Value
type.
Required Methods§
Sourcefn validate_value(
&self,
value: &Value,
key: &Key,
) -> Result<(), ValidationErrors<Key>>
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.