Created
December 28, 2014 05:40
-
-
Save GirlBossRush/e238575a2a51e968cb58 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"rules": { | |
"stories": { | |
".read": true, | |
"$id": { | |
".read": true, | |
".write": true, | |
".validate": "newData.hasChildren(['updatedAt'])", | |
"body": { | |
".validate": "newData.isString()" | |
}, | |
"title": { | |
".validate": "newData.isString() && | |
newData.val().length <= 100" | |
}, | |
"description": { | |
".validate": "newData.isString() && | |
newData.val().length <= 2000" | |
}, | |
"updatedAt": { | |
".validate": "newData.isNumber() && | |
newData.val() <= now" | |
}, | |
"createdAt": { | |
".validate": "newData.isNumber() && | |
newData.val() <= now" | |
}, | |
"$other": { | |
".validate": false | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment