pub trait Validate: Sized {
    fn validate_with_config(
        &self,
        config: &ValidationConfig,
        errors: &mut Vec<ValidationError>
    ); fn validate_and_return_first_error(&self) -> Result<(), ValidationError> { ... } fn validate(&self, errors: &mut Vec<ValidationError>) { ... } }
Expand description

Validate an object

This trait is used automatically when inserting an object into a store.

Required Methods§

source

fn validate_with_config(
    &self,
    config: &ValidationConfig,
    errors: &mut Vec<ValidationError>
)

Validate the object

Provided Methods§

source

fn validate_and_return_first_error(&self) -> Result<(), ValidationError>

Validate the object using default config and return on first error

source

fn validate(&self, errors: &mut Vec<ValidationError>)

Validate the object using default configuration

Implementors§