lundi 30 mars 2020

How do I prevent data duplication for Firebase Realtime Database, Web, JavaScript

This is my database structure for the Users. How can I prevent the "ICNumber"(Identification Number) to be registered more than once? This is my database structure As you can see in the picture, there are 2 same Identification number are registered successfully.

This is the rule in my RealTime Database I tried putting this piece of code but it doesn't seem to work. Is there any way I can do the prevention in my Javascript or any correct way in my Firebase Rule?




Aucun commentaire:

Enregistrer un commentaire