title: Is it possible to use PropTypes to validate Dictionary-like objects?
body: <p>I need to validate dictionary-like objects in my reducers, but since I'm already using Babel I don't want to resort to tools like Typescript.</p>
  
  <p>Take this object as an example:</p>
  
  <pre><code>posts : {
      byId : {
          "post1" : {
              id : "post1",
              author : "user1",
              body : "......",
              comments : ["comment1", "comment2"]    
          },
          "post2" : {
              id : "post2",
              author : "user2",
              body : "......",
              comments : ["comment3", "comment4", "comment5"]    
          }
      }
      allIds : ["post1", "post2"]
  }
  </code></pre>
  
  <p>How could I express my expectations for the <strong>byId</strong> object using PropTypes? Is it possible? If so, how?</p>