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).

Inject this only to read the resolved config - configure through provideFormField and the with* features, never by providing the token directly.

Type#

InjectionToken<FormFieldConfig>