@taiger-common/model 1.0.9 → 1.0.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.
@@ -26,6 +26,7 @@ exports.EventSchema = {
26
26
  },
27
27
  description: {
28
28
  type: String,
29
+ required: [true, 'Please write a description for your event'],
29
30
  validate: {
30
31
  validator: function (value) {
31
32
  return value.length <= 2000; // Maximum allowed length
@@ -35,6 +36,8 @@ exports.EventSchema = {
35
36
  },
36
37
  start: {
37
38
  type: Date,
39
+ required: [true, 'Please Insert The Start of your event'],
40
+ min: [new Date(), "time can't be before now!!"]
38
41
  },
39
42
  end: {
40
43
  type: Date
@@ -23,6 +23,7 @@ export var EventSchema = {
23
23
  },
24
24
  description: {
25
25
  type: String,
26
+ required: [true, 'Please write a description for your event'],
26
27
  validate: {
27
28
  validator: function (value) {
28
29
  return value.length <= 2000; // Maximum allowed length
@@ -32,6 +33,8 @@ export var EventSchema = {
32
33
  },
33
34
  start: {
34
35
  type: Date,
36
+ required: [true, 'Please Insert The Start of your event'],
37
+ min: [new Date(), "time can't be before now!!"]
35
38
  },
36
39
  end: {
37
40
  type: Date
@@ -40,6 +40,7 @@ export declare const EventSchema: {
40
40
  };
41
41
  description: {
42
42
  type: StringConstructor;
43
+ required: (string | boolean)[];
43
44
  validate: {
44
45
  validator: (value: string) => boolean;
45
46
  message: string;
@@ -47,6 +48,8 @@ export declare const EventSchema: {
47
48
  };
48
49
  start: {
49
50
  type: DateConstructor;
51
+ required: (string | boolean)[];
52
+ min: (string | Date)[];
50
53
  };
51
54
  end: {
52
55
  type: DateConstructor;