A library to easily validate user input
Add this to your Cargo.toml
:
[dependencies]
validate = "*"
and this to your crate root:
extern crate validate;
use validate::*;
assert!(email().validate(&"test@domain.com").is_ok());
assert!(bound(..3).validate(&2).is_ok())