Add support for validating nested elements

Created on 30 March 2022, over 2 years ago
Updated 1 June 2024, 7 months ago

Problem/Motivation

While implementing this module in a commerce project to validate the email field inside a pane i noticed that the field part of the configuration only supports fields that are not nested inside form elements. I found some code in validateCustomForm that fixes the problem for form id commerce_checkout_flow_multistep_default for the pane contact_information, but my project has a custom checkout flow and a custom contact information pane, so this fix didn't work.

Steps to reproduce

  1. Install commerce and email_validator
  2. Create a new checkout flow
  3. Attempt to implement email validation on the checkout flow

Proposed resolution

Add generic support for nested fields, where the config line can chain multiple keys together with a new separator.

Remaining tasks

  • Implement changes (simple patch incoming)
  • Add documentation

User interface changes

Documentation needed

API changes

-

Data model changes

Config now supports chaining keys, fully backwards compatible.

Feature request
Status

Fixed

Version

2.2

Component

Code

Created by

🇳🇱Netherlands Zevior

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024