Why validation of dropdown field is triggered even though the field value is null?

Certified Senior Developer

a!localVariables(
  local!singleDropDownValue,
  local!multipleDropDownValue,
  {
    a!dropdownField(
      label: "Single Dropdown",
      placeholder: "Select",
      choiceLabels: { "Jane", "Jack" },
      choiceValues: { 1, 2 },
      value: local!singleDropDownValue,
      saveInto: { local!singleDropDownValue },
      validations: "Error..."
    ),
    a!multipleDropdownField(
      label: "Multiple Dropdown",
      placeholder: "Select",
      labelPosition: "ABOVE",
      choiceLabels: { "Jane", "Jack" },
      choiceValues: { 1, 2 },
      value: local!multipleDropDownValue,
      saveInto: { local!multipleDropDownValue },
      validations: "Error..."
    ),
    a!buttonLayout(
      primaryButtons: a!buttonWidget(label: "submit", submit: true)
    )
  }
)

Expecting validation to trigger only when the field value is not null. It works for multiple dropdown, but why not for dropdown?

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data