Problem/Motivation

Added in Drupal 10.2
Change record: #config_target in ConfigFormBase: using validation constraints for editing simple config

Proposed resolution

  • Account Settings form uses ConfigFormBase, allowing form elements to use #config_target.
  • Move all values getting and saving to #config_target style.
  • Adding an interlocking validation constraint for genpass_mode which is tied to verify_mail.
  • Update tests to confirm constraints are working.
  • Add test to check on

Remaining tasks

  • ✅ File an issue
  • ✅ Addition/Change/Update/Fix
  • ✅ Testing to ensure no regression
  • ✅ Automated unit testing coverage
  • ✅ Code review by maintainers
  • ➖ Code review by someone else? Nope.
  • ✅ Release notes snippet
  • ✅ Release: 2.1.0

User interface changes

  • Error messages made more specific.

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

Issue fork genpass-3457738

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

ELC created an issue. See original summary.

rishabjasrotia made their first commit to this issue’s fork.

elc’s picture

Issue summary: View changes

Still needs unit testing that confirms and API-first config changes are also validated.

ELC changed the visibility of the branch 3457738-use-configtarget-and to hidden.

elc’s picture

Assigned: elc » Unassigned
Issue summary: View changes
Status: Needs work » Needs review

I was expecting configuration schema to be enforced during tests. It didn't appear to be so I did the validation using SchemaCheckTrait.

  • ELC committed a6e5bde7 on 2.1.x
    [#3457738] Use #config_target and validation constraints for settings.
    
elc’s picture

Issue summary: View changes
Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.