title: JSON Schema - specify string length based on input property
body: <p>Is it possible with JSON Schema to specify a string length that depends on the value of a property in the item that is being validated?</p>
  
  <p>For example, I have a document with a "foo" property with value 3. I would like to ensure that the "bar" property is a string of at least size 3</p>
  
  <p><strong>Sample JSON</strong></p>
  
  <pre><code>{
  "foo": 3,
  "bar": "111"
  }
  </code></pre>
  
  <p><strong>JSON Schema</strong></p>
  
  <pre><code>{
     "properties" : {
        "foo": {
           "type": "integer",
           "minimum": 1
         }
        "bar": {
           "type": "string",
           "minLength": "{$foo}"
         }
     }
  }
  </code></pre>