Skip to main content
cngx-src documentation

CNGX_FORM_FIELD_CONFIG

Tokenv0.1.0

InjectionToken<FormFieldConfig>

Description#

Holds the merged FormFieldConfig every CngxFormField in scope reads for its defaults. Each slice comes from one with* feature:

  • error messages - withErrorMessages
  • constraint-hint formatters - withConstraintHints
  • required marker - withRequiredMarker
  • autocomplete map - withAutocompleteMappings
  • spellcheck-off set - withNoSpellcheck
  • error-visibility strategy - withErrorStrategy

Populated by provideFormField(...). The default factory returns an empty config, so without a provider every feature stays off and the presenter uses its built-in behaviour (error gate touched OR reveal, no hints, no marker).

Read it through injectFormFieldConfig(). App-wide configuration goes through provideFormField; a sub-tree override goes through provideFormFieldAt on a component's providers / viewProviders. Both merge with* features the same way.

Type#

InjectionToken<FormFieldConfig>