-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Field API Validation: signal when optional #74417
Copy link
Copy link
Labels
[Feature] DataViewsWork surrounding upgrading and evolving views in the site editor and beyondWork surrounding upgrading and evolving views in the site editor and beyond[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] EnhancementA suggestion for improvement.A suggestion for improvement.
Metadata
Metadata
Assignees
Labels
[Feature] DataViewsWork surrounding upgrading and evolving views in the site editor and beyondWork surrounding upgrading and evolving views in the site editor and beyond[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] EnhancementA suggestion for improvement.A suggestion for improvement.
Type
Fields
Give feedbackNo fields configured for Enhancement.
What
The current Field API supports setting a field as required:
This comes with some handy marker in the field label:
Screen.Recording.2026-01-07.at.18.46.13.mov
However, there are situations (e.g., most fields are required) where we don't want to signal the "required" fields, but rather the "optional" ones. This is supported by the underlying components via a
markWhenOptionalflag:Screen.Recording.2026-01-07.at.18.49.38.mov
What is your proposed solution?
There are a few avenues we could explore:
markWhenOptionalprop to Edit, like we havehideLabelFromVision.isValid.requiredto accept values other than boolean that codify how the label is rendered (add required or optional). For example,