Angular Form Validation | Reactive Form Validation | Angular Tutorial 25

preview_player
Показать описание
Step by step tutorial on Angular Form Validation and how to implement form validation. Please Like and Subscribe the Video. Comment below if you have any thoughts or question regarding video.
#RaviBhai #angulartutorialforbeginners

00:00 Introduction to Angular Form Validation
01:40 Implement Reactive Form Validation
06:38 Mat Error
10:45 Multiple Validators : maxlength
12:45 Disabling button on Invalid Form

For reference :-

Observable Video Link

Fake API Creation Video Link

Angular Material Full Course tutorial

Angular Tutorial Full Course

HTML FULL Course
Рекомендации по теме
Комментарии
Автор

Please *LIKE* and *SUBSCRIBE* the Video. *COMMENT* below if you have any thoughts or question regarding video

ravishankarkumar
Автор

minlength maxlength validation main error msg show nhi kr rha sir only input box red show krta h please tell me the solution

bhupendrasingh
Автор

Hello
I finished the reactive form. But I need your help. How to create generic for reactive form validation? So, I want to control the input of all my components from one place.

alikorkmaz
Автор

Hello @RightClick Programming

Firstly, I like to your video I need your help. I did input validation control like as video.But when I want to use as below;
Valitadion control not runing. Could you help me please ? Where am I doing wrong in code ?

<form [formGroup]="form" class="p-24" fxLayout="column" fxLayoutAlign="start" fxFlex="1 0 auto" name="form">

<div fxLayout="row" fxLayoutAlign="start center" fxFlex="1 0 auto">
<mat-form-field appearance="outline" fxFlex="100" class="pr-4">
<mat-label>Name</mat-label>
<input matInput maxlength="50" [(ngModel)]="data.issuerName" #ctrl="ngModel"
true}" trim="blur">
<mat-error *ngIf="handleError('ctrl', 'required')">Name field required!</mat-error>
<mat-error *ngIf="handleError('ctrl', 'pattern')">Please don't enter like !'^+%&/()=?_- special characters!</mat-error>
</mat-form-field>
</div>


initializeFormGroup(){
this.form=new FormGroup({
ctrl:new FormControl('', [Validators.required, Validators.pattern('^[A-Za-z0-9ñÑáéíóúÁÉÍÓÚ ]+$')]),
ctrl2:new FormControl('', [Validators.required, Validators.pattern('^[A-Za-z0-9ñÑáéíóúÁÉÍÓÚ ]+$')])
});
this.visibility = true;
}
handleError(controlName:string, errorName:string){
return
}

alikorkmaz