Skip to content

chore: make form validity API async#12925

Merged
vladitasev merged 6 commits intomainfrom
form-validity-async-2
Jan 26, 2026
Merged

chore: make form validity API async#12925
vladitasev merged 6 commits intomainfrom
form-validity-async-2

Conversation

@vladitasev
Copy link
Contributor

@vladitasev vladitasev commented Jan 19, 2026

The problem: form validity functionality has a lifecycle, independent of the rendering cycle, and can be triggered before the definePromise is resolved and CLDR/translations are available. This is an issue for any component that relies on CLDR or message bundles to return proper form validity information.

Changes:

  • UI5Element.ts now exposes a new getter definePromise that makes it easy for other modules to access this.constructor.definePromise
  • InputElementsFormSupport.ts awaits for this promise before querying form validity information

Additionally, this new getter is utilized by DatePicker.ts to provide a promise-based get dateValue version that is safe to use regardless of the component's lifecyle.

closes: #12785

@ui5-webcomponents-bot
Copy link
Collaborator

ui5-webcomponents-bot commented Jan 19, 2026

🧹 Preview deployment cleaned up: https://pr-12925--ui5-webcomponents.netlify.app

@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview January 23, 2026 07:47 Inactive
@vladitasev vladitasev merged commit 89a7ab9 into main Jan 26, 2026
14 checks passed
@vladitasev vladitasev deleted the form-validity-async-2 branch January 26, 2026 14:36
@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview January 26, 2026 14:36 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[framework]: CLDR data is loaded after component "formValidity" is fired

3 participants