Skip to main content

Validator

Trait Validator 

Source
pub trait Validator: Send + Sync {
    // Required method
    fn validate(&self, value: &str) -> Result<(), String>;
}
Expand description

Synchronous field validator. Implement this for custom validation logic.

Required Methods§

Source

fn validate(&self, value: &str) -> Result<(), String>

Trait Implementations§

Source§

impl Debug for dyn Validator

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Implementors§