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
Is your feature request related to a problem? Please describe.
When using the required validator on a FormField, that can have non String-type values, like many custom FormFields do (like a DatePicker), the current required validator throws an exception, since it tests on value.length > 0. Some FormFields may even return null.
One can imagine FormFields that allow an empty array as valid value, but not null. In this case the current required validator will not work as expected.
Describe the solution you'd like
Replacing required validator with adding notNull and notBlank. Or keeping required but stating it does only work on type String.
Is your feature request related to a problem? Please describe.
When using the required validator on a
FormField
, that can have nonString
-type values, like many customFormFields
do (like aDatePicker
), the current required validator throws an exception, since it tests onvalue.length > 0
. SomeFormField
s may even return null.One can imagine
FormField
s that allow an empty array as valid value, but not null. In this case the currentrequired
validator will not work as expected.Describe the solution you'd like
Replacing
required
validator with addingnotNull
andnotBlank
. Or keepingrequired
but stating it does only work on typeString
.Describe alternatives you've considered
none
Additional context
See my pull request
The text was updated successfully, but these errors were encountered: