INNER CODE UNIT · C#
name
Corsinvest/cv4pve-autosnap · src/Corsinvest.ProxmoxVE.AutoSnap.Api/AutoSnapEngine.cs:101
var name = GetPrefix(label) + timestamps[0];
if (!ValidName().IsMatch(name))
{
return $"Snapshot name '{name}' is not valid: label and timestamp format may contain only letters, digits, '-' and '_'.";
}
if (name.Length > MaxSnapshotNameLength)
{
return $"Snapshot name '{name}' is {name.Length} characters long, Proxmox VE accepts at most {MaxSnapshotNameLength}: use a shorter label or timestamp format.";
}
return null;
}
[GeneratedRegex("^[a-zA-Z][a-zA-Z0-9_-]+$")]
private static partial Regex ValidName();
private static void CheckLabelAndTimestampFormat(string label, string timestampFormat)