Skip to main content
cngx-src documentation

withGlobalRevealOnSubmit

Functioncommon/interactive/errorv0.1.0

projects/common/interactive/error-registry/provide-error-registry.ts

Description#

Reveals every registered scope on any DOM submit event.

Coarse-grained - affects every registered scope, every form. The feature installs a capture-phase document listener that calls registry.revealAll() on any submit anywhere in the document, even when the submit fires from a form unrelated to the scope of interest. Appropriate when the application treats every submit as a "show all errors now" trigger.

For finer-grained reveals (per-form, per-flow), skip this feature and call registry.reveal(name) from the consumer's submit handler instead - the scope-name registration path stays available without the global listener.

Signature#

withGlobalRevealOnSubmit()

Returns#

ErrorRegistryFeature