I am asking about if I had this firebase database
Misters
+ 7m1fyYchDscr8tUeI13uPXvdDvM2
+ gvTVc3gwRfTz3WL48vTGiiiTKZ22
- vWZ55LGiraaIErIiiVN4NVQc6Eh1
active_type:true
age: 27
How to prevent adding new Node or update existing node if its parent is Deleted (vWZ55LGiraaIErIiiVN4NVQc6Eh1)?
For example I have rules that prevent update
{
"rules": {
".read": true,
".write": "auth != null",
"Misters": {
"$Misterid": {
"active_type:true": {
".validate": "(data.val() == null) || (data.isString() && (data.val().length == 0))"
}
}
}
}
But I want to prevent if parent not Found