CreateImageWizard: validate azure resource group

Resource group names only allow alphanumeric characters, periods,
underscores, hyphens, and parenthesis and cannot end in a period. A
regex validation is now added to ensure this.

Documented by azure here:
https://docs.microsoft.com/en-us/rest/api/resources/resource-groups/create-or-update
This commit is contained in:
Jacob Kozol 2022-01-10 14:23:04 +01:00 committed by jkozol
parent 192d31c708
commit 0b45e7bc4f

View file

@ -98,6 +98,12 @@ export default {
{
type: validatorTypes.REQUIRED,
},
{
type: validatorTypes.PATTERN,
pattern: /^[-\w._()]+[-\w_()]$/,
message: 'Resource group names only allow alphanumeric characters, ' +
'periods, underscores, hyphens, and parenthesis and cannot end in a period',
},
],
}
// TODO check oauth2 thing too here?