Skip to content

Commit

Permalink
change regex
Browse files Browse the repository at this point in the history
  • Loading branch information
motm32 committed Jul 9, 2024
1 parent 288c52a commit 52806ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion appservice/src/createAppService/SiteNameStep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export class SiteNameStep extends AzureNameStep<SiteNameStepWizardContext> {

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.");
Expand Down

0 comments on commit 52806ff

Please sign in to comment.