You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you set a FormElement of type SELECTION or MULTIPLE_SELECTION as required, it will always fail validation because FormBuilder.validate() checks the value field on the FormElement but not the optionsSelected field that is set for these types.
if (element.getRequired()) {
// Should check optionsSelected if element.type == SELECTION or MULTIPLE_SELECTION
if (element.getValue() == null || element.getValue().length() == 0) {
isValid = false;
if (view instanceof EditText) {
((EditText) view).setError(element.getErrorMessageOrDefault());
}
}
}
The text was updated successfully, but these errors were encountered:
If you set a
FormElement
of typeSELECTION
orMULTIPLE_SELECTION
asrequired
, it will always fail validation becauseFormBuilder.validate()
checks thevalue
field on theFormElement
but not theoptionsSelected
field that is set for these types.The text was updated successfully, but these errors were encountered: