Only allow unique values in Firebase Realtime Database

Viewed 5842

Here's my data structure:

root
---+ mydata
    |--- -KqI0uf--1-bD3oLlx2h:"Joe"
    |--- -Kdk0bf--1-bx0oLlb9a:"Mike"
    |--- -Kox8gf--1-b36onlT3h:"Eve"

How do I write a rule to only allow unique values in my Firebase Realtime Database?

For example, I don't want this to happen:

root
---+ mydata
    |--- -KqI0uf--1-bD3oLlx2h:"Boss"
    |--- -Kdk0bf-3-bx0oLlb9a:"Bob"
    |--- -Kox8gf1-b36onlT3h:"Dot"
    |--- -Kbx8gff-1-b92ksvT7:"Bob" // this should not exist
0 Answers
Related