microsoft / vscode-azurefunctions

Azure Functions extension for VS Code
https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurefunctions
MIT License
291 stars 132 forks source link

Fail to add a new application setting which name start with number #4000

Closed v-ruizh closed 6 months ago

v-ruizh commented 6 months ago

OS: All Build Version: 20240229.2 Regression: Not a Regression

Repro Steps:

  1. Create a containerized function app in VS Code.
  2. Right click "Application Settings" node and select "Add New Setting...".
  3. Enter a name "234" as the application setting name -> Enter a value for this setting to create it.
  4. Check whether succeeds to add a new application setting with the name "234".

Expect: Succeed to add a new application setting with the name "234".

Actual: Fail to add a new application setting with the name "234". image

More Info:

  1. There is no validation when entering "234" as the application setting name in the creation option.
  2. Succeed to add a new application setting with the name "234" in regular function app.
v-ruizh commented 6 months ago

@motm32 I tried to create an app setting which name start with number from portal, it still failed with the below error. So the app setting name may be invalid if starts with number. image

I tried this on the new extension build, there is an error when entering app setting name start with number. image It seems that the validation message is incorrect. If the app setting name can't begin with number, it would be better to remove the "number" word from the validation (the highlight part).