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