In this below rules, newData seems to be something that is future once after the write is done.
So, to check something on the newData, can place it in validate.
{
"rules": {
"myproj": {
"chats":{
"$roomId":{
".read": "auth.uid != null",
".write": "auth.uid != null",
".validate" : "newData.child('nick').val() == 'myproj11'"
}
}
}
}
}
No comments:
Post a Comment