#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

#52 in No standard library

Download history 15399/week @ 2024-08-10 13259/week @ 2024-08-17 13826/week @ 2024-08-24 12137/week @ 2024-08-31 12845/week @ 2024-09-07 11578/week @ 2024-09-14 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 11691/week @ 2024-11-23

56,377 downloads per month
Used in 73 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