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:
parent
192d31c708
commit
0b45e7bc4f
1 changed files with 6 additions and 0 deletions
|
|
@ -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?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue