Firebase realtime database validate child object in array
up vote
1
down vote
favorite
Trying to validate that an array value only contains certain elements. The "focus" key, should only contain any or both of the following: "movement", "strength". So I tried sending this: { "focus": ["movement"] } ... and the security rules: "$id": { "focus" : { ".validate": "newData.hasChild('movement') || newData.hasChild('strength') || newData.hasChildren(['strength', 'movement'])" } } But get "Simulated update denied" and cannot understand why. Thanks in advance
json firebase firebase-realtime-database
share | improve this qu...