docs: function setFieldErrors (error) {
      // skip if no error object
      if (!error) {
          return
      }
      // if error is string then add as generic error
      if (typeof error === 'string') {
          this.errors.push(error)
      }
      // if error is object then should be error object from AJV
      else if (typeof error === 'object') {
          // validation errors are set as array on error data - it this is not
          // set then only add generic error
          if (!Array.isArray(error.data)) {
              // create message
              var message = typeof error.message === 'string'
                  ? error.message
                  : 'An error occurred'
              // add message to errors
              this.errors.push(message)
              // skip further processing
              return
          }
          // add validation errors to fields and clear values for fields with errors
          _.each(error.data, error => this.setFieldError(error))
      }
  }