From 52806ff804734e18d90522e12b75efb7ddb3fedd Mon Sep 17 00:00:00 2001 From: Megan Mott Date: Mon, 8 Jul 2024 17:41:16 -0700 Subject: [PATCH] change regex --- appservice/src/createAppService/SiteNameStep.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appservice/src/createAppService/SiteNameStep.ts b/appservice/src/createAppService/SiteNameStep.ts index 2df56741fe..46393782c9 100644 --- a/appservice/src/createAppService/SiteNameStep.ts +++ b/appservice/src/createAppService/SiteNameStep.ts @@ -113,7 +113,7 @@ export class SiteNameStep extends AzureNameStep { if (name.length < siteNamingRules.minLength || name.length > siteNamingRules.maxLength) { return vscode.l10n.t('The name must be between {0} and {1} characters.', siteNamingRules.minLength, siteNamingRules.maxLength); - } else if (this._siteFor === "containerizedFunctionApp" && (!/^[a-z]([-a-z0-9]*[a-z0-9])?$/.test(name))) { + } else if (this._siteFor === "containerizedFunctionApp" && (!/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/.test(name))) { return vscode.l10n.t("A name must consist of lower case alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character and cannot have '--'."); } else if (siteNamingRules.invalidCharsRegExp.test(name)) { return vscode.l10n.t("The name can only contain letters, numbers, or hyphens.");