File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ var azureSurvey = []*survey.Question{
7777 {
7878 Name : "resource" ,
7979 Prompt : & survey.Input {Message : "Enter the name of the resource group to use as default: " },
80- Validate : utils .ValidateAlphaNumeric ,
80+ Validate : utils .ValidateAlphaNumExtended ,
8181 },
8282}
8383
Original file line number Diff line number Diff line change @@ -71,6 +71,11 @@ var ValidateAlphaNumeric = survey.ComposeValidators(
7171 RegexValidator ("[a-z][0-9\\ -a-z]+" , "Must be an alphanumeric string" ),
7272)
7373
74+ var ValidateAlphaNumExtended = survey .ComposeValidators (
75+ survey .Required ,
76+ RegexValidator ("[a-zA-Z][0-9\\ -_a-zA-Z]+" , "Must be an alphanumeric string" ),
77+ )
78+
7479func ValidateDns (val string ) error {
7580 return ValidateRegex (val , dnsRegex , "String must be a dns compliant hostname" )
7681}
You can’t perform that action at this time.
0 commit comments