Comment type entity is not yet fully validatable:
./vendor/bin/drush config:inspect --filter-keys=comment.type.comment --detail --list-constraints --fields=key,validatability,constraints
> 🤖 Analyzing…
------------------------------------------------- ------------- ----------------------------------------------------------------------
Key Validatable Validation constraints
------------------------------------------------- ------------- ----------------------------------------------------------------------
comment.type.comment 91% ValidKeys: '<infer>'
comment.type.comment: Validatable ValidKeys: '<infer>'
comment.type.comment:_core Validatable ValidKeys:
- default_config_hash
comment.type.comment:_core.default_config_hash Validatable NotNull: { }
Regex: '/^[a-zA-Z0-9\-_]+$/'
Length: 43
↣ PrimitiveType: { }
comment.type.comment:dependencies Validatable ValidKeys: '<infer>'
comment.type.comment:description Validatable Regex:
pattern: '/([^\PC\x09\x0a\x0d])/u'
match: false
message: 'Text is not allowed to contain control characters, only
visible characters.'↣ PrimitiveType: { }
comment.type.comment:id Validatable Regex:
pattern: '/^[a-z0-9_]+$/'
message: 'The %value machine name is not valid.'
Length:
max: 166
↣ PrimitiveType: { }
comment.type.comment:label Validatable Regex:
pattern: '/([^\PC])/u'
match: false
message: 'Labels are not allowed to span multiple lines or contain
control characters.'
NotBlank: { }
↣ PrimitiveType: { }
comment.type.comment:langcode Validatable NotNull: { }
Choice:
callback:
'Drupal\Core\TypedData\Plugin\DataType\LanguageReference::getAllVali
dLangcodes'↣ PrimitiveType: { }
comment.type.comment:status Validatable ↣ PrimitiveType: { }
comment.type.comment:target_entity_type_id NOT ⚠️ @todo Add validation constraints to config entity type:
comment.type.*
comment.type.comment:uuid Validatable Uuid: { }
↣ PrimitiveType: { }
------------------------------------------------- ------------- ----------------------------------------------------------------------
Steps to reproduce
- Get a local git clone of Drupal core
11.x
. composer require drupal/config_inspector
— or manually install https://www.drupal.org/project/config_inspector/releases/2.1.5 or newer (which supports Drupal 11!)composer require drush/drush
vendor/bin/drush config:inspect --filter-keys=comment.type.comment --detail --list-constraints
Proposed resolution
Add validation constraints to missing properties.
Remaining tasks
User interface changes
None.
API changes
None.
Data model changes
More validation 🚀
Release notes snippet
None.