MCPcopy Create free account
hub / github.com/angular/components / isErrorState

Method isErrorState

src/material/core/error/error-options.ts:33–35  ·  view source on GitHub ↗
(control: AbstractControl | null, form: FormGroupDirective | NgForm | null)

Source from the content-addressed store, hash-verified

31@Service()
32export class ErrorStateMatcher {
33 isErrorState(control: AbstractControl | null, form: FormGroupDirective | NgForm | null): boolean {
34 return !!(control && control.invalid && (control.touched || (form && form.submitted)));
35 }
36
37 isSignalErrorState?(field: Field<unknown> | null): boolean {
38 if (!field) {

Callers 1

_getCurrentErrorStateMethod · 0.45

Implementers 6

MyErrorStateMatchersrc/dev-app/select/select-demo.ts
MyErrorStateMatchersrc/components-examples/material/selec
MyErrorStateMatchersrc/components-examples/material/selec
MyErrorStateMatchersrc/components-examples/material/input
ShowOnDirtyErrorStateMatchersrc/material/core/error/error-options.
MatStepsrc/material/stepper/stepper.ts

Calls

no outgoing calls

Tested by

no test coverage detected