Async Validation with Angular Reactive Forms + Firebase

preview_player
Показать описание

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

My goal with this video is to give you an async validator for your reactive forms that works with virtually any backend data source. Get in touch on Slack if you want to chat about it :)

Fireship
Автор

Thank you so much!!!
I struggled 8 hours to solve my problem and it turns out that I needed the `take` operator

biovawan
Автор

There is a logical error in your code. When you used the rxjs operator debounceTime(), you meant not to call the external resource till a 500 ms delay of the user input without being interrupted but what your code is doing is rejecting emitted values from the external resource, which actually won't happen as Firebase will only send one response, not from username FormControl valueChanges event. If you do a ** tap(()=>console.log('external call')) ** after the take(1) operator, you will notice that it will log every time there is a value change after passing the synchronous validators. Also, you should pass the custom async validator as a third asynchronous argument, not as a second synchronous argument.

Mohammed
Автор

Here I'm trying to validate aysnc in sync ...
busted my head for 4 hours over that before I took a closer look at that damn comma !!
great video thou, I know they say Angular is dieing but I guess I'm going down with this ship

elecktromaestimmy
Автор

Am I the only one who usually click on like before watching :)

razakadam
Автор

Very useful. That said, I keep wondering about how to do more general validation via the server for user input. They always say never to trust what comes through on the client, but I have yet to see any tutorials about how to do server-side validation.

DanielRLuke
Автор

I just love your videos. There is no other youtube channel who posts such quality Angular videos as you do :) God bless

ajinkyax
Автор

Awesome picture, awesome voice, awesome explanation! Thank you!

DimanIvanov
Автор

Hey, Mr. Fireship, I enjoy your content, but I was wondering if you currently have or plan to have videos going over the many features in NRWL. I complained about the sparse documentation and the small community for it on another one of your video that went over its basic overview -- admittedly, I had been struggling with a NRWL-related issues for a couple of days when I had -- but I still think it's a great tool and would love to learn more about it, such as the best design pattern practices and the best means of integrating it with Firebase.

If you ever see this comment, please let me know.

bigk
Автор

There is a problem, when you see on network in developer tools, the request is made to the firestore service every time the user changes the input value.

juanpablovillegasgomez
Автор

Nice!!!! Been waiting for this one! Thanks man!

reyco
Автор

Is there any option how to minimize the actual number of request to firebase?
I am new to this, but I think that angular if you use Service (in case of httpClient) and DI on async validator can cancel network request if you type fast, in this case, there will be certainly a way to not send post requests to firebase, I thought that is the reason of that debounce operator. Still, you can add synchronous validators as well, and this will at least with minLength, and pattern/email format ensure that async validator will stream data only when synch validators are resolved as null.
What is concerns me is that this can turn into really unnecessary expensive usage of firebase if done incorrectly.

marcel
Автор

this guy haha, always saving me. Thanks!

webr
Автор

Thank you!

Can you someday make a video about the email/password login in firebase + email verification + changing user data after login (and adding a profile picture to storage in firebase) :D

wesvdl
Автор

Hey AngularFirebase, what about making a video on proxy setting with Angular CLI..?

VinsysVlogs
Автор

Isn’t it problematic that someone could get the email addresses connected to the username by simple brutforce?

Meaning: is there a way to get only an response from Firebase if the username is taken or not without the full user object?

__
Edit: great videos by the way!

denisy
Автор

Can i ask for the tune you put in the beginning of each one of your videos ?

eqdatshit
Автор

Can this apply to ionic? if can, where should i make major change on it? I found the html quite different

please help a lowly beginner here D:

juanwang
Автор

Hi there, I just got started to learn angular and the latest version is angular 5. Can i ask what month did you start creating video about angular 5. I'm asking this so that i can avoid the angular 4 tutorials in your channel. Hope you'll reply Thank you!

champolot
Автор

What's the Operating System you are using?

JeffrinJ