| Crates.io | hostname-validator |
| lib.rs | hostname-validator |
| version | 1.1.1 |
| created_at | 2018-11-02 16:58:16.77055+00 |
| updated_at | 2022-03-26 15:57:32.809698+00 |
| description | Validate hostnames according to IETF RFC 1123 |
| homepage | |
| repository | https://github.com/pop-os/hostname-validator |
| max_upload_size | |
| id | 94352 |
| size | 5,008 |
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));