Set a maximum number of children in Firebase
问题 There are some other (older) questions about this, but since they already are a few years old, I am curious if there have been an update about this. I want to animate a lottery, in which users can buy tickets. Everything is going well, but I want to make sure there are never more than a thousand sold tickets. It has to be server side, and these are my rules: "Lottery": { ".read": "auth != null", ".write": "auth != null", "counter": { ".validate": "newData.isNumber() && newData.val() > 0 &&