title: Firebase Rules -- Multiple Default Values
body: <p>I have a parent as 'Client' in my firebase. This is then followed by a child of 'invoices' and then followed by children on the invoice</p>
  
  <pre><code>'clients' {
      'uid' {
         'invoices' {
            'number': '1003 //etc...
            'payments' {
  
             }
             'history' {
  
             }
             'discussion' {
  
             }
         }
      }
   }
  </code></pre>
  
  <p>I am trying to only allow clients to write to payments, history, and discussion. But when I do the following I get an error <code>Cannot have multiple default rules ('$payments' and '$history').</code> in the Firebase Dashboard Rules Section.</p>
  
  <pre><code>"clients": {
        ".write" : "root.child('roles').child(auth.uid).child('level').val() == 4",
        ".indexOn" : "number",
        "$estimates": {
          "$discussion": {
            ".write": "root.child('roles').child(auth.uid).child('level').val() == 2"
          }
        },
        "$invoices": {
          "$payments": {
            ".write": "root.child('roles').child(auth.uid).child('level').val() == 2"
          },
          "$history": {
            ".write": "root.child('roles').child(auth.uid).child('level').val() == 2" 
          },
          "$discussion": {
            ".write": "root.child('roles').child(auth.uid).child('level').val() == 2"
          }
        }
      },
  </code></pre>
  
  <p>What is the correct way to write these rules then?</p>