title: How to validate number of properties in JSON schema
body: <p>I am trying to create a schema for a piece of JSON and have slimmed down an example of what I am trying to achieve.</p>
  
  <p>I have the following JSON schema:</p>
  
  <pre><code>{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Set name",
  "description": "The exmaple schema",
  "type": "object",
  "properties": {
      "name": {
          "type": "string"
      }
  },
  "additionalProperties": false
  }
  </code></pre>
  
  <p>The following JSON is classed as valid when compared to the schema:</p>
  
  <pre><code>{
  "name": "W",
  "name": "W"
  }
  </code></pre>
  
  <p>I know that there should be a warning about the two fields having the same name, but is there a way to force the validation to fail if the above is submitted? I want it to only validate when there is only one occurrence of the field 'name'</p>