Skip to content

Commit bed7a60

Browse files
fernandolobatoknithinc
authored andcommitted
Consistency with SKU parameter for Azure (#420)
Solving issue: #107 Azure allows the "." character for SKU but the current implementation of the validation pattern does not include this character. This pull request changes the regular expression to add this pattern.
1 parent 88127c8 commit bed7a60

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ComputeAdmin/AzureStack.ComputeAdmin.psm1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ function Add-AzsVMImage {
8888

8989
[Parameter(Mandatory = $true, ParameterSetName = 'VMImageFromLocal')]
9090
[Parameter(Mandatory = $true, ParameterSetName = 'VMImageFromAzure')]
91-
[ValidatePattern("[a-zA-Z0-9-]{3,}")]
91+
[ValidatePattern("[a-zA-Z0-9-\.]{3,}")]
9292
[String] $Sku,
9393

9494
[Parameter(Mandatory = $true, ParameterSetName = 'VMImageFromLocal')]
@@ -331,7 +331,7 @@ function Remove-AzsVMImage {
331331
[String] $Offer,
332332

333333
[Parameter(Mandatory = $true)]
334-
[ValidatePattern("[a-zA-Z0-9-]{3,}")]
334+
[ValidatePattern("[a-zA-Z0-9-\.]{3,}")]
335335
[String] $Sku,
336336

337337
[Parameter(Mandatory = $true)]
@@ -406,7 +406,7 @@ function Get-AzsVMImage {
406406
[String] $Offer,
407407

408408
[Parameter(Mandatory = $true)]
409-
[ValidatePattern("[a-zA-Z0-9-]{3,}")]
409+
[ValidatePattern("[a-zA-Z0-9-\.]{3,}")]
410410
[String] $Sku,
411411

412412
[Parameter(Mandatory = $true)]

0 commit comments

Comments
 (0)