powered by
Validates domain names according to RFC standards, checking for proper format, length restrictions, and character requirements. Supports both Unicode and ASCII domain names.
validate_domain(x, strict = getOption("punycoder.strict", TRUE))
An object of class "punycoder_validation" (a named list) with components:
"punycoder_validation"
Character vector of the input domain names.
Logical vector indicating whether each domain is valid.
List of character vectors, each containing error messages for the corresponding domain (empty for valid domains).
Character vector of domain names to validate
Logical; whether to apply strict validation. Defaults to `getOption("punycoder.strict", TRUE)`.
puny_encode for encoding validated domains.
puny_encode
# \donttest{ validate_domain("example.com") validate_domain("caf\u00E9.example.com") long_label <- paste(rep("x", 250), collapse = "") validate_domain(c("valid.com", "invalid..com", long_label)) # }
Run the code above in your browser using DataLab