Skip to content

Instantly share code, notes, and snippets.

@hiranya911
Last active March 2, 2020 04:55
Show Gist options
  • Save hiranya911/cde3913a9df1ebd13e9d2c304f84a2d7 to your computer and use it in GitHub Desktop.
Save hiranya911/cde3913a9df1ebd13e9d2c304f84a2d7 to your computer and use it in GitHub Desktop.
service cloud.firestore {
match /databases/{database}/documents {
match /cities/{city} {
allow write: if 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