code: function getError(field, value) {
  	// Check we actually got a string
  	if (typeof value !== "string") {
  		return errorInvalidParams(field + " must be a string");
  	}
  	// Check value is not empty
  	if (!value.trim()) {
  		return errorInvalidParams(field + " must not be empty");
  	}
  }
docs: Validation function