validators 0.26.0

This library is designed for validating and modeling user input. The crate includes models, functions, traits, errors, and other dependencies.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use core::fmt::{self, Display, Formatter};

/// Error from the `regex` validator.
#[derive(Debug, Clone)]
pub struct RegexError;

impl Display for RegexError {
    #[inline]
    fn fmt(&self, f: &mut Formatter) -> Result<(), fmt::Error> {
        f.write_str("invalid format")
    }
}

impl core::error::Error for RegexError {}