Reactive Form Validation in Angular - Do It Right

  Рет қаралды 3,889

Monsterlessons Academy

Monsterlessons Academy

Күн бұрын

Learn how to do reactive form validation in Angular correctly without any additional libraries. We will use standard validators, write custom validators and configure them as well as async validators which can work with API.
TIMESTAMPS
0:00 Introduction
1:29 Standard validators in Angular
6:39 Custom validators in Angular
10:05 Async custom validators in Angular
► CHECK MY COURSES - monsterlessons-academy.com/co...
MOST POPULAR COURSES
► Javascript interview questions - monsterlessons-academy.com/co...
► Typescript interview questions - monsterlessons-academy.com/co...
► React interview questions - monsterlessons-academy.com/co...
► Angular Interview Questions monsterlessons-academy.com/co...
► Building real project with Angular + NgRx - monsterlessons-academy.com/co...
► Building real NestJS API - monsterlessons-academy.com/co...
► Building real fullstack project - monsterlessons-academy.com/co...
► Mastering Git - monsterlessons-academy.com/co...
► Mastering Docker and Docker Compose - monsterlessons-academy.com/co...
FOLLOW ME
► TWITTER - / monster_lessons
► INSTAGRAM - / monsterlessonsacademy
► TIKTOK - / monsterlessonsacademy
REFERENCES
► Source code - github.com/monsterlessonsacad...

Пікірлер: 32
@MonsterlessonsAcademy
@MonsterlessonsAcademy Ай бұрын
WATCH NEXT: Angular Reactive Forms - All Needed Use Cases - kzfaq.info/get/bejne/i5-IopOovcCtcZs.htmlsi=lX_WMTjrN0o4U1Lr
@dunmer0992
@dunmer0992 2 ай бұрын
Very nice. It really hit the spot.
@MonsterlessonsAcademy
@MonsterlessonsAcademy 2 ай бұрын
Glad to hear that!
@oleksiipopov5143
@oleksiipopov5143 2 ай бұрын
Great lesson!
@MonsterlessonsAcademy
@MonsterlessonsAcademy 2 ай бұрын
Thanks! 😃
@ugochukwuumerie6378
@ugochukwuumerie6378 25 күн бұрын
Awesome lesson
@MonsterlessonsAcademy
@MonsterlessonsAcademy 24 күн бұрын
Glad you think so!
@fawzzhkz9023
@fawzzhkz9023 2 ай бұрын
❤superb
@MonsterlessonsAcademy
@MonsterlessonsAcademy 2 ай бұрын
Thanks 🤗
@user-qe2nv5dg2x
@user-qe2nv5dg2x 2 ай бұрын
this is nice, in order to unbloat the file i would suggest creating an error component that takes an the errors and formControls and displays them when ever error happens. with the right modularity this could save some massive time and allow you DRY code. (this is not the subject i know )
@MonsterlessonsAcademy
@MonsterlessonsAcademy Ай бұрын
Sure. You can split it like you want. I just showed the most simple and basic way, so people understand how it works.
@karthim9620
@karthim9620 2 ай бұрын
I need to connect
@TurboSasa
@TurboSasa 2 ай бұрын
Why not use form field getter in component ts for example `get firstName(): AbstractControl { return this.form.get('firstName'); }` and then in template `@if (firstName.invalid ...`
@MonsterlessonsAcademy
@MonsterlessonsAcademy 2 ай бұрын
It's a matter of taste. You can do that
@kanaiyatiwari6748
@kanaiyatiwari6748 2 ай бұрын
which themes you are using in vscode
@MonsterlessonsAcademy
@MonsterlessonsAcademy 2 ай бұрын
It's gruvbox
@sohailnaseer7251
@sohailnaseer7251 15 күн бұрын
@if decorator is not working in angular 15. what is the issue?
@MonsterlessonsAcademy
@MonsterlessonsAcademy 15 күн бұрын
It is not available in angular 15. Use *ngFor directive instead.
@Brendan2Alexander
@Brendan2Alexander Ай бұрын
So...do reactive forms work in a zoneless environment?
@MonsterlessonsAcademy
@MonsterlessonsAcademy Ай бұрын
everything works in zoneless environment
@chickenjoy
@chickenjoy 2 ай бұрын
What if I only want the errors to show when I click outside and not when I'm am still typing so that I will not get distracted or slightly pissed off that I haven't finished typing yet.
@MonsterlessonsAcademy
@MonsterlessonsAcademy 2 ай бұрын
There is touched property
@user-ly1np7qb1u
@user-ly1np7qb1u Ай бұрын
what is your fonts
@MonsterlessonsAcademy
@MonsterlessonsAcademy Ай бұрын
Monaco
@fadil2671
@fadil2671 2 ай бұрын
whats the difference with form = new FormGroup({ name: new FormControl(null, [Validators.required, Validators.minLength(8)]) desc: new FormControl(null) })
@MonsterlessonsAcademy
@MonsterlessonsAcademy 2 ай бұрын
There is no difference. You can provide validators if you need to but it is not mandatory
@fadil2671
@fadil2671 2 ай бұрын
@@MonsterlessonsAcademy okay, nice. thanks
@ardiannm
@ardiannm 2 ай бұрын
A comment for the algorithm
@MonsterlessonsAcademy
@MonsterlessonsAcademy 2 ай бұрын
Thanks!
@matthewfreedberg3752
@matthewfreedberg3752 Ай бұрын
"my speak english very bad. So, my name is Boris. I gotta go home to Albania to work on war factory and build tanks. London is a capital of Great Britain!" Damn, dude, I know it is very important to support all kinds of spreading knowledges, but at first you should work on your English pronunciation and only then play role of youtube blogger. My ears are bleeding right now! And I am still silent about how you look (not event close to Brad Pitt). If it is so necessary to practice English or acting or acting in English, there are so many platforms for it. I don't think that non-public frontend work for IT company brings less income than blogging (but who knows I am not an Angular blogger from USSR). For Christ's sake.
Dynamic Nested Forms Angular Explained
19:31
Monsterlessons Academy
Рет қаралды 4,1 М.
I Can't Believe We Did This...
00:38
Stokes Twins
Рет қаралды 106 МЛН
Cat Corn?! 🙀 #cat #cute #catlover
00:54
Stocat
Рет қаралды 14 МЛН
DO YOU HAVE FRIENDS LIKE THIS?
00:17
dednahype
Рет қаралды 101 МЛН
Angular Authentication and Authorization - The Correct Way
23:30
Monsterlessons Academy
Рет қаралды 27 М.
🚨 Angular 18 Is Out: Zoneless Upgrade (Step-By-Step)
14:36
Angular University
Рет қаралды 13 М.
Angular Animations Tutorial: Learn the Basics
6:56
Brian Treese
Рет қаралды 1,7 М.
A simple approach to displaying form validation messages in Angular
8:53
Fixing Expression Has Changed After It Was Checked Error in Angular
8:02
Monsterlessons Academy
Рет қаралды 2,8 М.
Angular Reactive Forms - All Needed Use Cases
15:55
Monsterlessons Academy
Рет қаралды 28 М.
REACTIVE FORM IN ANGULAR WITH VALIDATION IN A SIMPLEST WAY
15:28
In simplest way
Рет қаралды 7 М.
How to Make Forms in Angular REUSABLE (Advanced, 2023)
21:10
Decoded Frontend
Рет қаралды 59 М.
🚀 Angular async / await:  Can You Use It? (OFFICIAL Confirmation)
8:55
Angular University
Рет қаралды 6 М.
Senior Angular Developer Interview (theory)
41:57
WeCoded
Рет қаралды 10 М.
I Can't Believe We Did This...
00:38
Stokes Twins
Рет қаралды 106 МЛН