@thzero/library_server_validation_joi 0.18.9 → 0.18.10

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.
Files changed (2) hide show
  1. package/gamer.js +19 -8
  2. package/package.json +2 -2
package/gamer.js CHANGED
@@ -20,7 +20,7 @@ class GamerJoiValidationService extends JoiBaseValidationService {
20
20
  _gamerTagFull = Joi.string()
21
21
  .trim()
22
22
  //.alphanum()
23
- .regex(/^[a-zA-Z0-9]+([_\-\.a-zA-Z0-9 ]*)*$/)
23
+ .regex(/^[a-zA-Z0-9]+([_\-\.a-zA-Z0-9]*)*$/)
24
24
  .min(3)
25
25
  .max(30);
26
26
 
@@ -32,22 +32,33 @@ class GamerJoiValidationService extends JoiBaseValidationService {
32
32
  .max(30);
33
33
 
34
34
  _settingGamerSchema = Joi.object({
35
- gamerTag: this._gamerTagFull.allow(null).allow(''),
36
- gamerTagName: this._gamerTagDisplay.allow(null).allow(''),
37
- gamerTagSearch: this._gamerTagDisplay.allow(null).allow('')
35
+ // gamerTag: this._gamerTagFull.allow(null).allow(''),
36
+ // gamerTagDisplay: this._gamerTagDisplay.allow(null).allow(''),
37
+ // gamerTagSearch: this._gamerTagDisplay.allow(null).allow('')
38
+ gamerTag: this.settingGamerTagSchema(),
39
+ gamerTagDisplay: this.settingGamerTagDisplaySchema(),
40
+ gamerTagSearch: this.settingGamerTagSearchSchema()
38
41
  });
39
42
 
40
43
  gamerIdSchema = this._gamerId.required();
41
44
 
42
45
  gamerTagSchema = this._gamerTagFull.required();
43
46
 
44
- settingSchema() {
45
- const validation = super.settingSchema();
46
- return validation.concat(this._settingGamerSchema);
47
+ settingGamerTagSchema() {
48
+ return this._gamerTagFull.allow(null).allow('');
49
+ }
50
+
51
+ settingGamerTagDisplaySchema() {
52
+ return this._gamerTagDisplay.allow(null).allow('');
53
+ }
54
+
55
+ settingGamerTagSearchSchema() {
56
+ return this._gamerTagDisplay.allow(null).allow('');
47
57
  }
48
58
 
49
59
  settingSchema() {
50
- return this._settingGamerSchema;
60
+ const validation = super.settingSchema();
61
+ return validation.concat(this._settingGamerSchema);
51
62
  }
52
63
  }
53
64
 
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@thzero/library_server_validation_joi",
3
3
  "type": "module",
4
- "version": "0.18.9",
4
+ "version": "0.18.10",
5
5
  "version_major": 0,
6
6
  "version_minor": 18,
7
- "version_patch": 9,
7
+ "version_patch": 10,
8
8
  "version_date": "07/28/2025",
9
9
  "author": "thZero",
10
10
  "license": "MIT",