pub fn check_length(password: &str) -> PassablewordResultExpand description
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")
}
}