- Issue created by @narendraR
- Status changed to Needs review
8 months ago 9:07am 21 June 2024 - ๐ฎ๐ณIndia vinmayiswamy
Hi @narendraR,
Thanks for the MR. Iโve tested MR 8477 on Drupal 11.x.
The MR applied cleanly.Testing steps:
1. Get a local git clone of Drupal core 11.x.
2.composer require drupal/config_inspector
3.composer require drush/drush
4. Rundrush config:inspect --filter-keys=search.page.user_search --detail --list-constraints
Test Result:
Search page config entity is fully validated after the changes.The below are before and after inspections of the search page configuration:
Before:
---------------------------------------------------- --------- ------------- ------ --------------------------------------------------------------------------------------------- Key Status Validatable Data Validation constraints ---------------------------------------------------- --------- ------------- ------ --------------------------------------------------------------------------------------------- search.page.user_search Correct 80% โ โ ValidKeys: '<infer>' search.page.user_search: Correct Validatable โ โ ValidKeys: '<infer>' search.page.user_search:_core Correct Validatable โ โ ValidKeys: - default_config_hash search.page.user_search:_core.default_config_hash Correct Validatable โ โ NotNull: { } Regex: '/^[a-zA-Z0-9\-_]+$/' Length: 43 โฃ PrimitiveType: { } search.page.user_search:configuration Correct NOT โ โ โ @todo Add validation constraints to ancestor type: search.plugin.user_search search.page.user_search:dependencies Correct Validatable โ โ ValidKeys: '<infer>' search.page.user_search:dependencies.module Correct NOT โ โ โ @todo Add validation constraints to ancestor type: config_dependencies search.page.user_search:dependencies.module.0 Correct Validatable โ โ NotBlank: { } ExtensionName: { } ExtensionExists: module โฃ PrimitiveType: { } search.page.user_search:id Correct Validatable โ โ Regex: pattern: '/^[a-z0-9_]+$/' message: 'The %value machine name is not valid.' Length: max: 166 โฃ PrimitiveType: { } search.page.user_search:label Correct Validatable โ โ Regex: pattern: '/([^\PC])/u' match: false message: 'Labels are not allowed to span multiple lines or contain control characters.' NotBlank: { } โฃ PrimitiveType: { } search.page.user_search:langcode Correct Validatable โ โ NotNull: { } Choice: callback: 'Drupal\Core\TypedData\Plugin\DataType\LanguageReference::getAllValidLangcodes' โฃ PrimitiveType: { } search.page.user_search:path Correct NOT โ โ โ ๏ธ @todo Add validation constraints to config entity type: search.page.* search.page.user_search:plugin Correct Validatable โ โ PluginExists: manager: plugin.manager.search interface: Drupal\search\Plugin\SearchInterface โฃ PrimitiveType: { } search.page.user_search:status Correct Validatable โ โ โฃ PrimitiveType: { } search.page.user_search:uuid Correct Validatable โ โ Uuid: { } โฃ PrimitiveType: { } search.page.user_search:weight Correct Validatable โ โ Range: min: -2147483648 max: 2147483647 FullyValidatable: null โฃ PrimitiveType: { } ---------------------------------------------------- --------- ------------- ------ ---------------------------------------------------------------------------------------------
After:
---------------------------------------------------- --------- ------------- ------ --------------------------------------------------------------------------------------------- Key Status Validatable Data Validation constraints ---------------------------------------------------- --------- ------------- ------ --------------------------------------------------------------------------------------------- search.page.user_search Correct 100% โ โ ValidKeys: '<infer>' FullyValidatable: null search.page.user_search: Correct Validatable โ โ ValidKeys: '<infer>' FullyValidatable: null search.page.user_search:_core Correct Validatable โ โ ValidKeys: - default_config_hash โฃ NotNull: { } search.page.user_search:_core.default_config_hash Correct Validatable โ โ NotNull: { } Regex: '/^[a-zA-Z0-9\-_]+$/' Length: 43 โฃ PrimitiveType: { } search.page.user_search:configuration Correct Validatable โ โ โฃ NotNull: { } search.page.user_search:dependencies Correct Validatable โ โ ValidKeys: '<infer>' โฃ NotNull: { } search.page.user_search:dependencies.module Correct Validatable โ โ โฃ NotNull: { } search.page.user_search:dependencies.module.0 Correct Validatable โ โ NotBlank: { } ExtensionName: { } ExtensionExists: module โฃ PrimitiveType: { } โฃ NotNull: { } search.page.user_search:id Correct Validatable โ โ Regex: pattern: '/^[a-z0-9_]+$/' message: 'The %value machine name is not valid.' Length: max: 166 โฃ PrimitiveType: { } โฃ NotNull: { } search.page.user_search:label Correct Validatable โ โ Regex: pattern: '/([^\PC])/u' match: false message: 'Labels are not allowed to span multiple lines or contain control characters.' NotBlank: { } โฃ PrimitiveType: { } โฃ NotNull: { } search.page.user_search:langcode Correct Validatable โ โ NotNull: { } Choice: callback: 'Drupal\Core\TypedData\Plugin\DataType\LanguageReference::getAllValidLangcodes' โฃ PrimitiveType: { } search.page.user_search:path Correct Validatable โ โ NotBlank: { } โฃ PrimitiveType: { } โฃ NotNull: { } search.page.user_search:plugin Correct Validatable โ โ PluginExists: manager: plugin.manager.search interface: Drupal\search\Plugin\SearchInterface โฃ PrimitiveType: { } โฃ NotNull: { } search.page.user_search:status Correct Validatable โ โ โฃ PrimitiveType: { } โฃ NotNull: { } search.page.user_search:uuid Correct Validatable โ โ Uuid: { } โฃ PrimitiveType: { } โฃ NotNull: { } search.page.user_search:weight Correct Validatable โ โ Range: min: -2147483648 max: 2147483647 FullyValidatable: null โฃ PrimitiveType: { } โฃ NotNull: { } ---------------------------------------------------- --------- ------------- ------ ---------------------------------------------------------------------------------------------
Thanks!
- Status changed to RTBC
7 months ago 10:30am 26 June 2024 -
alexpott โ
committed 900d64b9 on 11.x
Issue #3456133 by narendraR, VinmayiSwamy: Add validation constraints to...
-
alexpott โ
committed 900d64b9 on 11.x
- Status changed to Fixed
7 months ago 10:51pm 3 July 2024 Automatically closed - issue fixed for 2 weeks with no activity.