loginForm = new FormGroup({ email: new FormControl('', [ Validators.required, Validators.email ]), password: new FormControl('', [ Validators.required, Validators.minLength(6) ]) }); <div *ngIf="loginForm.controls['email'].errors" class='invalid-feedback'> <div *ngIf="loginForm.controls['email'].errors.required"> Email не может быть пустым. Введите корректный email. </div> <div *ngIf="loginForm.controls['email'].errors.email"> Введите корректный email. </div> </div> Why is always displayed:
"Email cannot be empty. Enter a valid email. Enter a valid email."
although it should flash: "Email can not be empty. Enter a valid email."
and when at least 1 character appears: "Enter a valid email."
If I write Validators.pattern that defines email, then everything works as it should, and when I use Validators.email it does not work correctly.
As it is:
It should be:



requiredchecks forlength > 0, andemail- there is a regular session under the hood - overthesanityvaluein the input isnull, this value does not pass either the one or that check - overthesanity