title: Firebase: permission_denied -- cannot access newData.child()
body: <p>This is the structure of my data</p>
  
  <pre><code>{
   "projects" : {
       "proj1" : {
             "-JccS4StrTnJdTficR-u" : {
                 "name" : "consultation",
                 "status" : false
       },
            "-Jd6JlJUfyyZ2U0NTQEs" : {
                 "name" : "Words",
                 "status" : false
    }
     },
     "proj2" : {
            "-JccS6nwYHRrxvjZtCkt" : {
                "name" : "Rework",
                "status" : false
    },
           "-Jd6Jqa7-EPJuWxbtJAV" : {
               "name" : "Review",
               "status" : false
      }
     },
     "proj3" : {
           "-JccSJ5lEBQEg3XCbG-u" : {
              "name" : "translation",
              "status" : false
       }
      }
     }
   }
  </code></pre>
  
  <p>Here are my rules</p>
  
  <pre><code>{
  "rules": {
    ".read": true,
    "projects": {
        "proj1": {
          ".write": "auth != null"
        },
        "proj2": {
          ".write": true
        },
        "proj3": {
          ".write": true,
          ".validate": "newData.child('name').isString() 
                        &amp;&amp; newData.child('name').val().length &lt; 10"
        }
      }
    }
  }
  </code></pre>
  
  <p>When I created the database, there was no rule. Now, I've created the rules. I want the length of the name to be less than 10 characters. </p>
  
  <p>When I run the code, I'm getting the following error: <code>FIREBASE WARNING: set at /projects/proj3/-Jd4n6XditTHLWKVmhC6 failed: permission_denied</code></p>
  
  <p>I can't exactly tell why it's not working. I've also tried just this portion <code>newData.child('name').isString()</code>, but I'm still getting the same error.</p>
  
  <p>Here is the code that push data to FireBase</p>
  
  <pre><code>function saveToFB(taskName, proj) { 
    // this will save data to Firebase
    var project=projTasks.child(proj);
    project.push({
      name: taskName,
      status: false
    });
  };
  </code></pre>