{
  "$schema": "http://json-schema.org/schema#",
  "additionalProperties": false,
  "properties": {
    "emailAddress": {
      "pattern": "^[^@^\\s]+@[^@^\\.^\\s]+(\\.[^@^\\.^\\s]+)+$",
      "type": "string"
    },
    "hashpw": {
      "description": "set to False to skip password hashing",
      "type": "boolean"
    },
    "name": {
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "password": {
      "maxLength": 255,
      "minLength": 10,
      "type": "string"
    },
    "phoneNumber": {
      "pattern": "^$|^([\\d\\s()+-]){6,20}$",
      "type": "string"
    },
    "role": {
      "enum": [
        "buyer",
        "supplier",
        "admin",
        "admin-ccs-category",
        "admin-ccs-sourcing"
      ]
    },
    "supplierId": {
      "type": "integer"
    }
  },
  "required": [
    "emailAddress",
    "name",
    "password",
    "role"
  ],
  "title": "API Updater Schema",
  "type": "object"
}

{
  "$schema": "http://json-schema.org/schema#",
  "additionalProperties": false,
  "properties": {
    "emailAddress": {
      "pattern": "^[^@^\\s]+@[^@^\\.^\\s]+(\\.[^@^\\.^\\s]+)+$",
      "type": "string"
    },
    "hashpw": {
      "description": "set to False to skip password hashing",
      "type": "boolean"
    },
    "name": {
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "password": {
      "maxLength": 255,
      "minLength": 10,
      "type": "string"
    },
    "phoneNumber": {
      "pattern": "^$|^\\+?([\\d\\s()-]){6,20}$",
      "type": "string"
    },
    "role": {
      "enum": [
        "buyer",
        "supplier",
        "admin",
        "admin-ccs-category",
        "admin-ccs-sourcing"
      ]
    },
    "supplierId": {
      "type": "integer"
    }
  },
  "required": [
    "emailAddress",
    "name",
    "password",
    "role"
  ],
  "title": "API Updater Schema",
  "type": "object"
}

Make '+' in phone number only allowable at start
Make '+' in phone number only allowable at start

The '+' symbol is allowed in a phone number but only at the start. This
update to the pattern enforces this, but leaves the use of the '+' as
optional.
