Skip to main content

validate_name

Function validate_name 

Source
pub fn validate_name(name: &str) -> Result<(), ParseNameError>
Expand description

Validates whether a string slice is a valid node name.

A valid node name must meet the following criteria:

  • It cannot be longer than MAX_NAME_LENGTH (255 bytes).
  • It cannot be empty.
  • It cannot be “.” (single dot) or “..” (dot-dot).
  • It cannot contain “/” (slash) or embedded NUL (\0) characters.