#ietf #hostname #rfc #1123

no-std hostname-validator

Validate hostnames according to IETF RFC 1123

1 stable release

1.0.0 Nov 2, 2018

#5 in #hostname

Download history 2/week @ 2018-11-02

0 downloads per month

MIT license

3KB

hostname-validator

Rust crate for validating 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));

lib.rs:

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));

No runtime deps