Identify Invalid Azure Container Names -
how can 1 programmatically determine if container name invalid per rules?
valid naming container in azure blob storage.
- 3 63 characters
- starts letter or number
- letters, numbers, , dash (-)
- every dash (-) must preceded , followed letter or number
- all letters in container name must lowercase.
valid naming container in azure blob storage.
- 3 63 characters
- starts letter or number
- letters, numbers, , dash (-)
- every dash (-) must preceded , followed letter or number
- all letters in container name must lowercase.
in webapi used following:
if (container.length < 3 || container.length > 63 || !regex.ismatch(container, @"^[a-z0-9]+(-[a-z0-9]+)*$")) throw new httpresponseexception(request.createresponse( httpstatuscode.badrequest, "invalid request!"));
Comments
Post a Comment