#[cfg(feature = "valid_email")]
mod email;
mod extends;
mod ip;
mod length;
mod number;
mod string;
#[cfg(feature = "valid_url")]
mod url;
pub use crate::config::ValidateError;
#[cfg(feature = "valid_email")]
pub use email::*;
pub use extends::*;
pub use ip::*;
pub use length::*;
pub use number::*;
pub use string::*;
#[cfg(feature = "valid_url")]
pub use url::*;
pub type Validator<Val, Data, Ctx> =
Box<dyn FnOnce(&Val, &Data, &Ctx, bool) -> Result<(), ValidateError>>;
pub(crate) fn map_err(error: garde::Error) -> ValidateError {
ValidateError::new(error.to_string())
}