cloud-ide-model-schema 1.1.144 → 1.1.146
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.
|
@@ -21,8 +21,16 @@ var auth_user_mst = new mongoose_1.Schema({
|
|
|
21
21
|
},
|
|
22
22
|
user_middlename: {
|
|
23
23
|
type: String,
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
maxlength: 20,
|
|
25
|
+
// Allow empty strings - middle name is optional
|
|
26
|
+
validate: {
|
|
27
|
+
validator: function (value) {
|
|
28
|
+
// If value is provided and not empty, it must be at least 3 characters
|
|
29
|
+
// If value is empty or undefined, it's valid (optional field)
|
|
30
|
+
return !value || value.trim().length === 0 || value.trim().length >= 3;
|
|
31
|
+
},
|
|
32
|
+
message: 'Middle name must be at least 3 characters if provided'
|
|
33
|
+
}
|
|
26
34
|
},
|
|
27
35
|
user_lastname: {
|
|
28
36
|
type: String,
|
|
@@ -7,7 +7,7 @@ var core_system_pages = new mongoose_1.Schema({
|
|
|
7
7
|
sypg_page_code: {
|
|
8
8
|
type: String,
|
|
9
9
|
required: true,
|
|
10
|
-
minlength:
|
|
10
|
+
minlength: 3,
|
|
11
11
|
maxlength: 40,
|
|
12
12
|
unique: true,
|
|
13
13
|
trim: true
|
|
@@ -15,13 +15,13 @@ var core_system_pages = new mongoose_1.Schema({
|
|
|
15
15
|
sypg_title: {
|
|
16
16
|
type: String,
|
|
17
17
|
require: true,
|
|
18
|
-
minlength:
|
|
18
|
+
minlength: 3,
|
|
19
19
|
maxlength: 100,
|
|
20
20
|
trim: true
|
|
21
21
|
},
|
|
22
22
|
sypg_desc: {
|
|
23
23
|
type: String,
|
|
24
|
-
minlength:
|
|
24
|
+
minlength: 3,
|
|
25
25
|
maxlength: 255,
|
|
26
26
|
required: true,
|
|
27
27
|
trim: true
|
package/package.json
CHANGED