Crate hostname_validator

Source
Expand description

Validate a hostname according to the IETF RFC 1123.

extern crate hostname_validator;

let valid = "VaLiD-HoStNaMe";
let invalid = "-invalid-name";

assert!(hostname_validator::is_valid(valid));
assert!(!hostname_validator::is_valid(invalid));

Functionsยง