Can the votes array be restricted to exactly 5 entries?
Checking if newData.child('votes').val().length === 5) doesn't work because the length property only applies to strings. Here is a sample of my data:
votes
$voteID
page:"12345"
user: "facebook:1234567"
votes: {
-K3M2kpTEtXRk-sHV6FO: true
-K3M2kp_5vZDCZKUke2M: true
-K3M2kpe7l22mYA1dc6D: true
-K3M2kqhpgehSSUAcFLl: true
-K3M2krABl2tU-cekpDA: true
}
Is there a way to enforce this validation for exactly 5 entries in the array?