pub trait Validator: Send + Sync {
// Required methods
fn validate(&self, value: &str) -> ValidationResult;
fn name(&self) -> &str;
}Expand description
A validator that can validate a string value.
Required Methods§
Sourcefn validate(&self, value: &str) -> ValidationResult
fn validate(&self, value: &str) -> ValidationResult
Validate the given value.