Add a setting to make stripping #required values from customer profile fields in its reference widget optional

Created on 28 March 2012, over 13 years ago
Updated 7 July 2025, 5 days ago

I notice on the admin order ui form, required customer profile fields are no longer required?

I was able to validate the fields manually as required using a form_alter hook, however, even though the profile failed validation, the profile was already saved, e.g with a required field empty.

Further investigation shows in

commerce_customer.module line 1020
commerce_customer_profile_manager_validate

The profile is actually saved during validation

There's a "TODO, trap it on error, rebuild the form with error messages" but that looks like it's not implemented yet.

Is there any way to validate customer profile fields on the order ui form without saving the erroneous profile?

Alternatively, I may need to do js-only validation...

Thanks in advance, and thanks again for the great module set.

DT

Feature request
Status

Closed: outdated

Version

1.0

Component

Customer

Created by

🇳🇿New Zealand davidwhthomas

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