@routr/common 2.7.0 → 2.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -60,10 +60,8 @@ exports.isValidName = isValidName;
60
60
  const hasUsername = (username) => username ? true : new errors_1.BadRequestError("the username is required");
61
61
  exports.hasUsername = hasUsername;
62
62
  const isValidUsername = (username) => {
63
- if (username &&
64
- (!Validator.default.isAlphanumeric(username) ||
65
- !Validator.default.isLowercase(username))) {
66
- return new errors_1.BadRequestError("the username must be a lowercase, alphanumeric, and without spaces");
63
+ if (username === null || username === void 0 ? void 0 : username.includes(" ")) {
64
+ return new errors_1.BadRequestError("the username must not contain spaces");
67
65
  }
68
66
  return true;
69
67
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@routr/common",
3
- "version": "2.7.0",
3
+ "version": "2.7.3",
4
4
  "description": "Common package",
5
5
  "author": "Pedro Sanders <psanders@fonoster.com>",
6
6
  "homepage": "https://github.com/fonoster/routr#readme",
@@ -55,5 +55,5 @@
55
55
  "devDependencies": {
56
56
  "@types/js-yaml": "^4.0.5"
57
57
  },
58
- "gitHead": "46d067f61a0797fbab905073f70c7ab319979d1d"
58
+ "gitHead": "bf6ff39f269f1d6f479d6a0b9ca35331e97e24de"
59
59
  }