Problem/Motivation
Ran into this while working on #3364109: [PP-2] Configuration schema & required values: add test coverage for `nullable: true` validation support.
#3341682: New config schema data type: `required_label` introduced type: required_label
, and it looks like this:
required_label:
type: label
label: 'Label'
constraints:
NotBlank: {}
NotBlank
has a $allowNull
option that defaults to FALSE
. In other words: it disallows bothNULL
and the empty string ''
.
Unfortunately, this means that any config property that is explicitly marked required by setting the NotNull
constraint, this triggers a double error:
Steps to reproduce
See tests.
Proposed resolution
- Write tests.
- Adjust
type: required_label
to work fine both whenNotNull
is present and when it is absent.
Remaining tasks
None.
User interface changes
None.
API changes
None.
Data model changes
None.
Release notes snippet
N/A