NameValidationPolicyAnnotation Properties
Class Properties 5 members
Represents an annotation that customizes the name validation rules applied to a resource when it is added to the application model.
Gets the maximum allowed length for the resource name, or
null to disable length validation. Defaults to ModelName.DefaultMaxLength. public int? MaxLength { get; init; } Gets a value indicating whether to validate that the name contains only ASCII letters, digits, and hyphens. Defaults to
true. public bool ValidateAllowedCharacters { get; init; } Gets a value indicating whether to validate that the name does not contain consecutive hyphens. Defaults to
true. public bool ValidateNoConsecutiveHyphens { get; init; } Gets a value indicating whether to validate that the name does not end with a hyphen. Defaults to
true. public bool ValidateNoTrailingHyphen { get; init; } Gets a value indicating whether to validate that the name starts with an ASCII letter. Defaults to
true. public bool ValidateStartsWithLetter { get; init; }