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
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:
- 2.1.x-3457738-validconfig
changes, plain diff MR !24
- 3457738-use-configtarget-and
compare
Comments
Comment #3
elc commentedStill needs unit testing that confirms and API-first config changes are also validated.
Comment #6
elc commentedI was expecting configuration schema to be enforced during tests. It didn't appear to be so I did the validation using SchemaCheckTrait.
Comment #8
elc commented