title: How to create a required conditional field using Alpaca?
body: <p>Does anyone know how I can define a required field which is dependant on another field? </p>
  
  <p>For example if <code>field1</code> is marked <code>true</code> then <code>field2</code> must be required, otherwise field 2 should not be filled.</p>
  
  <p>Here is my current attempt:</p>
  
  <pre><code>"field1": {
      "title": "Field1:",
      "type": "string",
      "enum": ["true", "false"]
  },
  "field2": {
      "title": "Field2:",
      "type": "integer",
      "dependencies": "field1",
      "required": true
  }
  </code></pre>