Skip to main content

validate_name

Function validate_name 

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

A VM name’s shape: ASCII letters, digits, -, _, at most 128 bytes, and never a MicroVM id prefix.

The charset is the image-name pattern ([a-zA-Z0-9-_]+). It makes the CLI’s identifier resolution total — an identifier starting with microvm- can only be an id, because a legal name is refused that prefix, and an ARN cannot match because : is outside the set — and it makes every name a safe file name.