Trait aliri_braid::Validator[][src]

pub trait Validator {
    type Error: Error + Send + Sync + 'static;
    fn validate(s: &str) -> Result<(), Self::Error>;
}
Expand description

A validator that can verify a given is valid given certain preconditions

Associated Types

type Error: Error + Send + Sync + 'static[src]

Expand description

The error produced when the string is invalid

Loading content...

Required methods

fn validate(s: &str) -> Result<(), Self::Error>[src]

Expand description

Validates a string according to a predetermined set of rules

Loading content...

Implementors

impl<T> Validator for T where
    T: Normalizer
[src]

fn validate(s: &str) -> Result<(), Self::Error>[src]

Validates the provided value, but additionally returns an error if the value is not already in normalized form

type Error = NormalizationError<T::Error>

Loading content...