I'm new to firebase and I'm trying to use it in a small application. I'm used to work with relational db and it's weired for me the concept of document and collections of firebase because I didn't work with NoSql before.
I have a form which consists of firstName, lastName, age, gender and other attributes. I want to make a constraint that prohibit to enter two different users with the same firstName and lastName.
I choose the cloudfirestore for different reasons such as :
- Offline support for iOS, Android, and web clients.
- Indexed queries with compound sorting and filtering.
- Atomic write and transaction operations.
as mentioned in Choose a Database: Cloud Firestore or Realtime Database .
However in the cloudfirestore and under the tab Rules I have these lines:
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if true;
}
}
}
I need to add some validations or rules such as in the realtime database like Understand Firebase Realtime Database Rules.
Is there any sections that cover this part of validations rules in cloudfirestore that I missed? Any link or proposition will be welcome.