Angular forms tutorial # Reactive forms validation

preview_player
Показать описание
In this angular 9 tutorial, we will learn how we can make a reactive form and how to apply validation in angular with a simple example in the English language
step of video
Import Reactive Form module
Make HTML form
Define form group
Get form value
apply validation

Checkout and subscribe our new channel for technical news
Рекомендации по теме
Комментарии
Автор

Checkout and subscribe our new channel for technical news

codestepbystep
Автор

Great video, this tutorial just saved my life, thank you so much.

ayanavolahiri
Автор

I like your style, simple and to the point !

devenshah
Автор

Thank you very much i was searching for this and this video helped me😊👌❤😁!!

uvindupathirana
Автор

I got an error when I put "email.invalid " in my span tag, how I can solve it? (object is possibly null)

ranjeetgoutam
Автор

Hi,
I getting some errors like:- Object is possibly 'null'
*ngIf="email.invalid"

Could you help me to solve it.

saurabhk
Автор

why error message will not show up like you show in the video? Also, can you post css code?
<label> Email Address: </label>
<input formControlName="email" type="email" name="email" placeholder="Your Email Address"> <br/>
<span class="error" *ngIf="email.value !== '' && email.untouched && email.invalid" > Email is required</span><br/><br/>
export class AppComponent {
title = 'reactiveForm';
employee = new FormControl('');
public loginForm: FormGroup;
constructor() {
this.loginForm = new FormGroup({
'email': new FormControl(''),
'username': new FormControl('', [Validators.required]),
'password': new FormControl('', [Validators.required])
});
}
public sendLogin(): void {

}

get email(){ return this.loginForm.get('email')}
}

devenshah
Автор

i have a error in my span tag when im putting email.inavlid how can i resolve it

mehransheikh
Автор

Error in src/app/app.component.html (21:28)
Property 'invalid' does not exist on type 'HTMLInputElement'. Did you mean 'oninvalid'?

what doset that mean?

SannanTheTraveller
Автор

How do you make the errors appear after the user clicks submit

leratomphahlele
Автор

I am not able to see the validation part properly.

saptanilchowdhury
Автор

gadbad hai ismai border pehele se hi red hai

websiteteam