title: What is the confirm password approach on json schema draft 07?
body: <p>AFAIK the <code>$data</code> key was removed on the draft 07 of the JSON schema, so I'm wondering how to approach the Confirm Password</p>
  
  <p>I'm using <code>Newtonsoft JSON Schema Validator</code> and I have the following schema, but I got the next errors:</p>
  
  <p><strong>Error:</strong></p>
  
  <p><a href="https://i.stack.imgur.com/5Syph.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5Syph.png" alt=""></a></p>
  
  <p><strong>Error Message</strong>
    <a href="https://i.stack.imgur.com/fxF2V.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fxF2V.png" alt=""></a></p>
  
  <pre><code>{
    "$schema": "http://json-schema.org/draft-07/schema",
    "definitions": {
      "SignIn": {
        "properties": {
          "Password": {
            "$id": "SignInPassword",
            "maxLength": 15,
            "minLength": 6,
            "type": "string"
          },
          "Username": {
            "oneOf": [
              {
                "format": "email",
                "type": "string"
              },
              {
                "pattern": "^\\+?[1-9]\\d{1,14}$",
                "type": "string"
              }
            ]
          }
        },
        "required": [
          "Password",
          "Username"
        ],
        "type": "object"
      }
    },
    "allOf": [
      {
        "$ref": "#/definitions/SignIn"
      },
      {
        "properties": {
          "ConfirmPassword": {
            "const": {
              "$data": "1/Password"          
            },
            "minLength": 6,
            "type": "string"
          }
        },
        "required": [
          "ConfirmPassword"
        ],
        "type": "object"
      }
    ]
  }
  </code></pre>