#ietf-rfc #rfc #hostname #ietf #validation #1123

no-std hostname-validator

Validate hostnames according to IETF RFC 1123

3 stable releases

Uses old Rust 2015

1.1.1 Mar 26, 2022
1.1.0 Jun 6, 2021
1.0.0 Nov 2, 2018

#50 in No standard library

Download history 11358/week @ 2024-07-21 14575/week @ 2024-07-28 15665/week @ 2024-08-04 14979/week @ 2024-08-11 13679/week @ 2024-08-18 13706/week @ 2024-08-25 12019/week @ 2024-09-01 12521/week @ 2024-09-08 11795/week @ 2024-09-15 11959/week @ 2024-09-22 14797/week @ 2024-09-29 12186/week @ 2024-10-06 13189/week @ 2024-10-13 13552/week @ 2024-10-20 14511/week @ 2024-10-27 14730/week @ 2024-11-03

56,451 downloads per month
Used in 69 crates (6 directly)

MIT license

4KB
51 lines

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