Skip to content

Commit

Permalink
docs: mat-error can only rendered if the input has touched and is inv…
Browse files Browse the repository at this point in the history
…alid state (angular#27752)

The mat-error can only rendered if the input has touched and the input is invalid. The "either" term in the explanation may be confusing and lead to the assumption that the mat-error is rendered if it has a touch or an invalid status.
  • Loading branch information
SerkanSipahi authored Sep 8, 2023
1 parent 3f5a43b commit bae9539
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/material/input/input.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ element. In some cases that `<mat-form-field>` may use the placeholder as the la
The `<mat-form-field>` allows you to
[associate error messages](https://material.angular.io/components/form-field/overview#error-messages)
with your `matNativeControl`. By default, these error messages are shown when the control is invalid and
either the user has interacted with (touched) the element or the parent form has been submitted. If
the user has interacted with (touched) the element or the parent form has been submitted. If
you wish to override this behavior (e.g. to show the error as soon as the invalid control is dirty
or when a parent form group is invalid), you can use the `errorStateMatcher` property of the
`matNativeControl`. The property takes an instance of an `ErrorStateMatcher` object. An `ErrorStateMatcher`
Expand Down

0 comments on commit bae9539

Please sign in to comment.