How can I validate DataBase Records before create it in Firebase?

Hi, How can I validate records during “creating records”?

For example primary key using “E-MAIL”, when I need to garantee that I will have just one record with an specific e-mail; When I put an email that alread exists in database, I expect to receive this messages below
… This e-mail already exists;
… This product already inserted;

Obs: I’m using Firebase in my APP

Get the data from the database first using get record collection. In this ,


In the first output you display a notice that the data exists



This example did not works. Is there some Youtube Video with this explanation?

I tried to use GET DATA COLLECTION and did’nt works too;


Your app variable called data Must hold the data from firebase for this to work.