- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Required vs. not required (probably not empty) values
β π Configuration schema & required values: add test coverage for `nullable: true` validation support Fixed + π Configuration schema & required keys Fixed
Allowed values / enum
Already in core β see this for
ckeditor5.plugin.ckeditor5_language
for example:Choice: - un - all
And just now: β¨ Add optional validation constraint support to ConfigFormBase Fixed should significantly lower the bar to adopt configuration schema-based validation in admin UIs (i.e. forms) for simple config!
- π¬π§United Kingdom joachim
> Already in core β see this for ckeditor5.plugin.ckeditor5_language for example:
Yes but that's only the option values. It doesn't define the option labels.
The labels are needed for decoupled UIs, and also for translation.
- π¦π²Armenia murz Yerevan, Armenia
There are several contrib modules that allow building configuration forms directly from the schema:
- https://www.drupal.org/project/schema_form β
- https://www.drupal.org/project/auto_config_form β
- https://www.drupal.org/project/schema_based_config_forms β
They work very good and significantly decrease the amount of boilerplate that need to be written!
But the main issue is the strict format of the Drupal Schema format that misses the "description" property, which is crucial for most of the forms to provide good UI.
As a workaround, we can use the
third_party_settings
property that is already widely used in different parts of Drupal, so I created a feature request to add this property: β¨ Allow third_party_settings property in the Drupal Schema format to allow storing metadata and custom module-related data Active - please join ;-)