#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

#48 in No standard library

Download history 11544/week @ 2024-09-21 15056/week @ 2024-09-28 12562/week @ 2024-10-05 13022/week @ 2024-10-12 13460/week @ 2024-10-19 13831/week @ 2024-10-26 15505/week @ 2024-11-02 12662/week @ 2024-11-09 14750/week @ 2024-11-16 13777/week @ 2024-11-23 14953/week @ 2024-11-30 15418/week @ 2024-12-07 13725/week @ 2024-12-14 5051/week @ 2024-12-21 6367/week @ 2024-12-28 10798/week @ 2025-01-04

38,186 downloads per month
Used in 85 crates (7 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