Trait validr::Validation[][src]

pub trait Validation: Clone + for<'de> Deserialize<'de> {
    fn rules(&self) -> Vec<Rule<Self>> { ... }
fn modifiers(&self) -> Vec<Modifier<Self>> { ... }
fn validate(self) -> Result<Self, ValidationErrors> { ... } }

Provided methods

fn rules(&self) -> Vec<Rule<Self>>[src]

Method that is intended to return vector of all the validation rules

fn modifiers(&self) -> Vec<Modifier<Self>>[src]

Method that is intended to return vector of all the modifications to the object before the validation runs

fn validate(self) -> Result<Self, ValidationErrors>[src]

This will run the validation and return the object if all the validations pass. Object will be modified by all the modifiers and ready for using further

Loading content...

Implementors

Loading content...