Questions tagged [mat-error]

For questions about the element for Angular Material. When using this tag also include the more generic [angular-material] and [angular] tags where possible.

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:
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
grudev
  • 485
  • 1
  • 6
  • 15
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
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:
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
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…
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 Media Upin
sangRam
  • 315
  • 4
  • 17