Skip to content

Instantly share code, notes, and snippets.

@davideast
Last active April 20, 2021 17:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save davideast/b428d6256b5524bee557 to your computer and use it in GitHub Desktop.
Save davideast/b428d6256b5524bee557 to your computer and use it in GitHub Desktop.
Bolt output
{
"rules": {
"users": {
"$uid": {
".validate": "newData.hasChildren(['uid', 'name', 'username'])",
"uid": {
".validate": "newData.isString()"
},
"name": {
".validate": "newData.isString()"
},
"username": {
".validate": "newData.isString()"
},
"$other": {
".validate": "false"
}
}
},
"posts": {
"$postid": {
".validate": "newData.hasChildren(['uid', 'title', 'description', 'timestamp'])",
"uid": {
".validate": "newData.isString()"
},
"title": {
".validate": "newData.isString()"
},
"description": {
".validate": "newData.isString()"
},
"timestamp": {
".validate": "newData.isNumber()"
},
"$other": {
".validate": "false"
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment