I have made some tests with firebase and saw difference in rules validation between onDisconnect().update()
and simple update()
using newData.par
firebaser here
During an onDisconnect()
operation, each property is treated as a separate write operation while we're validating the rules. That means that in your case the operation fails. While this is an unfortunate design, it is unlikely to change in the near future. For this reason I recommend using simpler write operations in onDisconnect()
handlers.