+ # span_validator
+ Simple validation with error reporting, inspired by [validator](https://github.com/Keats/validator). Provide users with targeted, actionable error messages.
+
+ ## Why not validator?
+ I'd love to see this functionality [become a part of validator](https://github.com/Keats/validator/pull/272). Until then, unless you specifically need span-based validation, just use validator. This crate only exists to provide better error messages than possible with just validator.
+
+ ## Example
+ ```rust
+ use span_validator::email::{Error, ErrorSpan, validate_email};
+
+ // invalid"@example.com
+ // ^
+ assert_eq!(
+ validate_email(r#"invalid"@example.com"#),
+ Err(ErrorSpan { error_type: Error::InvalidUserCharacter, span: 7..7 })
+ );
+ ```