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
Why there isn't any condition for the validation property and instead it just has a text?
Required validations are triggered when you submit the form whereas the validation added via 'validations' property of a field triggers instantly.
Just for testing hardcoded the text in validations. The behaviour is same with condition too.
My question is why both the field doesn't work similar? Dropdown shows the validation whereas multiple dropdown doesn't show.
Could be because one supports single selection and the other supports multiple. Did you try the same behavior with text and pickers, allowing multiple selections?
Also, is this behaviour causing any errors or issues in the app?
in the documentation both field says : , could be a bug ? as value is null