docs: function getErrorMessage (error) {
      // get schema from model
      var schema = this.model && this.model.schemaData && this.model.schemaData.properties
      // error message
      var message
      // get custom error message from schema if defined
      if (schema) {
          // if there is a base property get nested property
          if (error.baseProperty) {
              message = schema[error.baseProperty].items
                  && schema[error.baseProperty].items.properties
                  && schema[error.baseProperty].items.properties[error.property]
                  && schema[error.baseProperty].items.properties[error.property].errors 
                  && schema[error.baseProperty].items.properties[error.property].errors[error.keyword]
          }
          // get custom error message if any
          else {
              message = schema[error.property]
                  && schema[error.property].errors
                  && schema[error.property].errors[error.keyword]
          }
      }
      // if there is custom error message return it
      if (message) {
          return message
      }
      // default missing property error
      if (error.params && error.params.missingProperty) {
          return error.property+' required'
      }
      // default validation error
      else {
          return error.message
      }
  }