{
   "rules": {
      ".read": false,
      ".write": false,
      "syncedValue": {
         ".read": true,
         ".write": true,
         ".validate": "newData.isString() && newData.val().length <= 100"
      },
      "messages": {
         ".read": true,
         "$message": {
            ".write": true,
            ".validate": "newData.hasChildren(['text'])",
            "text": {
               ".validate": "newData.isString() && newData.val().length <= 1000"
            },
            "$other": {
               ".validate": false
            }
         }
      },
      "users": {
         "$user": {
            ".read": "auth.uid === $user",
            ".write": "auth.uid === $user",
            "name": {
               ".validate": "newData.isString() && newData.val().length <= 2000"
            },
            "email": {
               ".validate": "newData.isString() && newData.val().length <= 2000"
            },
            "$other": {
               ".validate": false
            }
         }
      }
   }
}
{
   "rules": {
      ".read": false,
      ".write": false,
      "syncedValue": {
         ".read": true,
         ".write": true,
         ".validate": "newData.isString() && newData.val().length <= 100"
      },
      "messages": {
         ".read": true,
         "$message": {
            ".write": true,
            ".validate": "newData.hasChildren(['text'])",
            "text": {
               ".validate": "newData.isString() && newData.val().length <= 1000"
            },
            "$other": {
               ".validate": false
            }
         }
      },
      "users": {
         "$user": {
            ".read": "auth.uid === $user",
            ".write": "auth.uid === $user && (!newData.exists() || newData.hasChildren())",
            "name": {
               ".validate": "newData.isString() && newData.val().length <= 2000"
            },
            "email": {
               ".validate": "newData.isString() && newData.val().length <= 2000"
            },
            "$other": {
               ".validate": false
            }
         }
      }
   }
}
Update write rules for profiles
Update write rules for profiles
