@elemental/ui / TypeAlias

LmnErrorStateMatchers

A type that represents the possible values for the errorStateMatcher input of the LmnDynamicValidatorMessageDirective The default key is required to be used as default value when a specif error is not specified into object.

Presentation

Example usage

const myStateMatcherObj: LmnErrorStateMatchers = {
 default: onDirtyOrSubmittedErrorStateMatcher,
 someCustomError1: onTouchedOrSubmittedErrorStateMatcher,
 someCustomError2: (control, isFormSubmitted) => ...,
}
<lmn-input-radio-group [errorStateMatcher]="myStateMatcherObj" ...>...</lmn-input-radio-group>