Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IsRequired field is not working for Visual Studio editor #6870

Open
ahmedeceng87 opened this issue Jul 17, 2023 · 3 comments
Open

IsRequired field is not working for Visual Studio editor #6870

ahmedeceng87 opened this issue Jul 17, 2023 · 3 comments

Comments

@ahmedeceng87
Copy link

As per wiki documentation isRequired field if set to true (or condition that evaluates to true) and user has not specified the value on input, validation error occurs. But this is not happening from Visual Studio editor. I am able to create a project without giving any input to a field (symbol) whose isRequired is set to true. Does isRequired field does not works with UI (VS editor)? Let me know if more info is required.

@BottlecapDave
Copy link

I'm personally not seeing this behavior work via the SDK either (on mac). I have a choice based parameter and another text based parameter which has a condition on the choice parameter. However it's always evaluating to false.

"cloud": {
    "type": "parameter",
    "datatype": "choice",
    "description": "The type of cloud infrastructure to include",
    "choices": [
      {
        "choice": "gcp",
        "description": "Google Cloud infrastructure"
      },
      {
        "choice": "azure",
        "description": "Azure cloud infrastructure"
      },
      {
        "choice": "none",
        "description": "No cloud infrastructure"
      }
    ],
    "isRequired": true
  },
  "location": {
    "type": "parameter",
    "datatype": "text",
    "description": "The location the cloud infrastructure is installed within",
    "replaces": "_LOCATION_",
    "fileRename": "_LOCATION_",
    "isEnabled": "cloud != none",
    "isRequired": "cloud != none"
  },

@ahmedeceng87
Copy link
Author

This problem is only coming when I create project (using template) from visual studio editor i.e UI.
This problem is not seen if project is created via command line (like we do it in VS code).

@ahmedeceng87
Copy link
Author

I have uploaded a sample code here. In this sample code CopyrightName symbol is configured with isRequired to true.
"CopyrightName": { "type": "parameter", "defaultValue": "Mohd Ahmed", "replaces": "NamePlaceHolder", "isRequired": true }
Now after installing this project template, I am able to create a new project using this template and with an empty CopyrightName value (isRequired = true doesn't work) using VS2022 editor.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants