[−][src]Function passablewords::check_length
pub fn check_length(password: &str) -> PassablewordResult
Check a password to make sure it's at least 8 characters long. While this shouldn't be used as the only password check, it's a good baseline to start from.
Example (using rocket.rs)
match check_length(password) { Ok() => status::Ok Err(err) => match(err) { PassablewordResult::TooShort => status::BadRequest("Your password should be longer than 8 characters") } }