Skip to content

Instantly share code, notes, and snippets.

@hiranya911
Created March 1, 2020 19:43
Show Gist options
  • Save hiranya911/032a7b2ea35221849de2cb3916f3e773 to your computer and use it in GitHub Desktop.
Save hiranya911/032a7b2ea35221849de2cb3916f3e773 to your computer and use it in GitHub Desktop.
service cloud.firestore {
match /databases/{database}/documents {
match /cities/{city} {
allow write: if int(request.resource.data.population) > 0
&& request.resource.data.name is string
&& request.resource.data.name.size() > 0
&& request.resource.data.name.size() <= 32;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment