@tstdl/base 0.91.39 → 0.91.40

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tstdl/base",
3
- "version": "0.91.39",
3
+ "version": "0.91.40",
4
4
  "author": "Patrick Hein",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -22,11 +22,12 @@ export class NumberSchema extends SimpleSchema {
22
22
  constraints: [
23
23
  (options?.integer == true) ? (value) => globalThis.Number.isInteger(value) ? ({ success: true }) : ({ success: false, error: 'Value is not an integer.' }) : null,
24
24
  isNumber(options?.minimum) ? (value) => (value >= this.minimum) ? ({ success: true }) : ({ success: false, error: `Value must be more than or equal to ${this.minimum}.` }) : null,
25
- isNumber(options?.maximum) ? (value) => (value >= this.maximum) ? ({ success: true }) : ({ success: false, error: `Value must be less than or equal to ${this.maximum}.` }) : null
25
+ isNumber(options?.maximum) ? (value) => (value <= this.maximum) ? ({ success: true }) : ({ success: false, error: `Value must be less than or equal to ${this.maximum}.` }) : null
26
26
  ]
27
27
  });
28
28
  this.integer = options?.integer ?? false;
29
29
  this.minimum = options?.minimum ?? null;
30
+ this.maximum = options?.maximum ?? null;
30
31
  }
31
32
  }
32
33
  export function number(options) {