docs: function setErrorPath (error) {
      // split path into segments on dots
      var path = error.dataPath.split('.')
      // get missing property if any
      var missingProperty = error.params && error.params.missingProperty
      // path starts with dot and includes the data property name so all paths
      // start with two segments that will be ignored - the third segment is a
      // property name which may include an index for nested arrays
      if (path.length > 2) {
          var property = path[2]
          // split property on index brackets to extract index if it exists
          var propertySegments = property.split(indexRegExp)
          // if there is more than one segment then there is an index
          if (propertySegments.length > 1) {
              // set property name without index
              error.baseProperty = propertySegments[0]
              // get index from property name
              error.index = parseInt(propertySegments[1])
              // if there is missing property use it as property
              error.property = missingProperty
                  ? missingProperty
                  : path[3]
          }
          // property does not have index
          else {
              if (missingProperty) {
                  error.baseProperty = property
                  error.property = missingProperty
              }
              else {
                  error.property = property
              }
          }
      }
      // if there is not base property then missing property is only property
      else {
          error.property = missingProperty
      }
  }