Add validation constraints to contact.settings

Created on 21 February 2024, 4 months ago
Updated 25 April 2024, 2 months ago

Problem/Motivation

The Contact module's settings have 3 property paths that are not yet validatable:

$ ./vendor/bin/drush config:inspect --filter-keys=contact.settings --detail --list-constraints  --fields=key,validatability,constraints
โžœ  ๐Ÿค– Analyzingโ€ฆ

 --------------------------------------------- ------------- ------------------------------------------ 
  Key                                           Validatable   Validation constraints                    
 --------------------------------------------- ------------- ------------------------------------------ 
  contact.settings                              63%           ValidKeys: '<infer>'                      
   contact.settings:                            Validatable   ValidKeys: '<infer>'                      
   contact.settings:_core                       Validatable   ValidKeys:                                
                                                                - default_config_hash                   
   contact.settings:_core.default_config_hash   Validatable   NotNull: {  }                             
                                                              Regex: '/^[a-zA-Z0-9\-_]+$/'              
                                                              Length: 43                                
                                                              โ†ฃ PrimitiveType: {  }                     
   contact.settings:default_form                NOT           โš ๏ธ  @todo Add validation constraints here  
   contact.settings:flood                       Validatable   ValidKeys: '<infer>'                      
   contact.settings:flood.interval              NOT           โš ๏ธ  @todo Add validation constraints here  
   contact.settings:flood.limit                 NOT           โš ๏ธ  @todo Add validation constraints here  
   contact.settings:user_default_enabled        Validatable   โ†ฃ PrimitiveType: {  }                     
 --------------------------------------------- ------------- ------------------------------------------ 

Steps to reproduce

  1. Get a local git clone of Drupal core 11.x.
  2. 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!)
  3. composer require drush/drush
  4. vendor/bin/drush config:inspect --filter-keys=contact.settings --detail --list-constraints

Proposed resolution

  1. Add validation constraints.
  2. Mark FullyValidatable.

Remaining tasks

Review.

User interface changes

None.

API changes

None.

Data model changes

None.

Release notes snippet

N/A

๐Ÿ“Œ Task
Status

Fixed

Version

10.3 โœจ

Component
Contactย  โ†’

Last updated 7 days ago

Created by

๐Ÿ‡ง๐Ÿ‡ชBelgium Wim Leers Ghent ๐Ÿ‡ง๐Ÿ‡ช๐Ÿ‡ช๐Ÿ‡บ

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024