Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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