ValidateNested

Trait ValidateNested 

Source
pub trait ValidateNested: Validate {
    // Required method
    fn validate_nested(
        &self,
        path: &FieldPath,
        ctx: &ValidationContext,
    ) -> Result<(), ValidationErrors>;
}
Expand description

Trait for nested struct validation.

Implemented by types that contain nested validatable structures.

Required Methods§

Source

fn validate_nested( &self, path: &FieldPath, ctx: &ValidationContext, ) -> Result<(), ValidationErrors>

Validate as a nested field with path prefix.

Implementors§

Source§

impl<T> ValidateNested for T
where T: Validate,