For questions about the
Questions tagged [mat-error]
23 questions
2
votes
1 answer
After call setErrors method in FormControl doesn't show inmediately (Angular Material)
When I call setErrors for a textbox FormControl instance as shown in the images below, there should be an error message immediately but I don't see it until I remove the entire text.
Here is my HTML code:

Jorge Zapata
- 40
- 6
2
votes
1 answer
Angular Material Mat-error Showing error for valid inputs, while validating with regex
Creating a signup form using angular material, It is displaying errors even if there is no error.
For a valid input it is displaying the error Invalid Input.
I've removed that mat-error condition the field is turning red while entering data.
The…

yagami
- 149
- 2
- 12
1
vote
1 answer
Form validation in Angular mat form
I am building login form using angular mat form.
Login form is following.
login-form.component.html
1
vote
0 answers
mat-error not showing up with ControlValueAccessor
I have a custom app-input component which uses mat-form-field and mat-error but the error is not showing up.
Am I assigning the NgControl to the formfield the right way?
component
import { Component, OnInit, Input, forwardRef, HostListener, Self,…

Hary
- 5,690
- 7
- 42
- 79
1
vote
1 answer
Is it possible to make entire border of input mat form field fill red on validation error
In my form i have email field which is customized and i cant use outline appearance input field .
Enter your email

ani
- 446
- 1
- 9
- 31
1
vote
1 answer
mat-form-field outline is triggering validation border color change while conditions still false
I have the following script to handle validation message:
…

CZar
- 17
- 3
1
vote
1 answer
mat-error is not visible on a component that I created
I use angular 8 with angular material to create my app.
I have the following form field defined:
…

ufk
- 30,912
- 70
- 235
- 386
0
votes
0 answers
How to show required error on mat-select, on clicking next form
So i have a dropdown first.
Then i have a input.
When i select the input without selecting the first dropdown, i need to show validation for the first drop down.
1.First form:

Arjun Sunny
- 1
- 1
0
votes
0 answers
( Angular 8) I'm using mat-error, it breaks click or change events
Hello,
I am using mat-Select and mat-error. There is no problem in giving a warning, but after giving a warning, the 'mat-error' breaks the 'mat-select' event broked.
I press mat-select more than once (click) event but it works.
The place where the…

Onur Dikmen
- 339
- 1
- 6
- 17
0
votes
2 answers
Angular mat error : How can to prevent displaying error on control touched and display it only on button click
I need to display validation error only on button click not on control touched

Mitul Sheth
- 51
- 6
0
votes
1 answer
mat-form-field outlined hover effect when invalid
I'm trying to change the color of the background, of a mat-form-field outlined when I have the mouse hover.
.mat-form-field.mat-form-field-appearance-outline.mat-form-field-outline-thick {
// HOVER EFFECT
background-color:…

David Pires
- 48
- 1
- 10
0
votes
1 answer
angular materror check dropdown ngmodel object valid
Good day,
Normally, I will set the drop down value into a string, for example:
…

Panadol Chong
- 1,793
- 13
- 54
- 119
0
votes
1 answer
Angular 11 Custom ISBN Validator Reactive Forms
I'm doing a custom validation for an ISBN number, I already have the function that checks the number and works perfect giving me the response by console, but I need to do the custom validator to get the error in the view with the form control and in…

Laura Díaz
- 85
- 1
- 9
0
votes
1 answer
mat error not display error on click of button. angular 7
I am having problem to display error message in mat error. following is html code.
HTML
0
votes
1 answer
Mat error is not displaying error for custom validators but template is displaying error
app.component.html
…

Kartik Dolas
- 703
- 1
- 9
- 24