Skip to content

Instantly share code, notes, and snippets.

@tarex
Forked from davideast/rules.json
Created July 3, 2017 05:54
Show Gist options
  • Save tarex/149af70eaf087d2691cd86116e1dd5d0 to your computer and use it in GitHub Desktop.
Save tarex/149af70eaf087d2691cd86116e1dd5d0 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