@fecp/mobile 1.0.18 → 1.0.19
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/es/mobile.css +5 -5
- package/es/node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/picker/Picker.mjs +2 -2
- package/es/node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/picker-group/PickerGroup.mjs +3 -4
- package/es/packages/mobile/index.mjs +4 -12
- package/es/packages/mobile/src/components/all.mjs +4 -12
- package/es/packages/mobile/src/components/form/checkboxGroup/CheckboxGroup.vue.mjs +1 -1
- package/es/packages/mobile/src/components/form/field/Field.vue.mjs +17 -14
- package/es/packages/mobile/src/components/form/fieldCalendarPicker/FieldCalendarPicker.vue.mjs +23 -35
- package/es/packages/mobile/src/components/form/fieldCascaderPicker/fieldCascaderPicker.vue.mjs +33 -45
- package/es/packages/mobile/src/components/form/fieldCheckbox/FieldCheckbox.vue.mjs +43 -0
- package/es/packages/mobile/src/components/form/fieldCheckbox/index.mjs +10 -0
- package/es/packages/mobile/src/components/form/fieldDatePicker/FieldDatePicker.vue.mjs +31 -43
- package/es/packages/mobile/src/components/form/fieldPicker/FieldPicker.vue.mjs +31 -43
- package/es/packages/mobile/src/components/form/fieldRadio/FieldRadio.vue.mjs +19 -0
- package/es/packages/mobile/src/components/form/fieldRadio/index.mjs +10 -0
- package/es/packages/mobile/src/components/form/fieldTimePicker/FieldTimePicker.vue.mjs +30 -42
- package/es/packages/mobile/src/utils/formRule.mjs +49 -11
- package/lib/mobile.css +5 -5
- package/lib/node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/picker-group/PickerGroup.js +2 -3
- package/lib/packages/mobile/index.js +60 -68
- package/lib/packages/mobile/src/components/all.js +60 -68
- package/lib/packages/mobile/src/components/form/checkboxGroup/CheckboxGroup.vue.js +1 -1
- package/lib/packages/mobile/src/components/form/field/Field.vue.js +16 -13
- package/lib/packages/mobile/src/components/form/fieldCalendarPicker/FieldCalendarPicker.vue.js +22 -34
- package/lib/packages/mobile/src/components/form/fieldCascaderPicker/fieldCascaderPicker.vue.js +32 -44
- package/lib/packages/mobile/src/components/form/fieldCheckbox/FieldCheckbox.vue.js +43 -0
- package/lib/packages/mobile/src/components/form/fieldCheckbox/index.js +10 -0
- package/lib/packages/mobile/src/components/form/fieldDatePicker/FieldDatePicker.vue.js +30 -42
- package/lib/packages/mobile/src/components/form/fieldPicker/FieldPicker.vue.js +30 -42
- package/lib/packages/mobile/src/components/form/fieldRadio/FieldRadio.vue.js +19 -0
- package/lib/packages/mobile/src/components/form/fieldRadio/index.js +10 -0
- package/lib/packages/mobile/src/components/form/fieldTimePicker/FieldTimePicker.vue.js +29 -41
- package/lib/packages/mobile/src/utils/formRule.js +49 -11
- package/package.json +1 -1
|
@@ -13,13 +13,11 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
13
13
|
;/* empty css */
|
|
14
14
|
;/* empty css */
|
|
15
15
|
;/* empty css */
|
|
16
|
-
;/* empty css */
|
|
17
|
-
;/* empty css */
|
|
18
16
|
const vue = require("vue");
|
|
17
|
+
const index = require("../field/index.js");
|
|
19
18
|
const moment = require("../../../../../../node_modules/.pnpm/moment@2.30.1/node_modules/moment/dist/moment.js");
|
|
20
|
-
const index = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/field/index.js");
|
|
21
|
-
const index$1 = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/popup/index.js");
|
|
22
19
|
const index$2 = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/date-picker/index.js");
|
|
20
|
+
const index$1 = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/popup/index.js");
|
|
23
21
|
const _sfc_main = {
|
|
24
22
|
__name: "FieldDatePicker",
|
|
25
23
|
props: {
|
|
@@ -72,46 +70,36 @@ const _sfc_main = {
|
|
|
72
70
|
showPicker.value = false;
|
|
73
71
|
};
|
|
74
72
|
return (_ctx, _cache) => {
|
|
75
|
-
const _component_van_field = index.Field;
|
|
76
73
|
const _component_van_date_picker = index$2.DatePicker;
|
|
77
74
|
const _component_van_popup = index$1.Popup;
|
|
78
|
-
return vue.openBlock(), vue.
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => vue.isRef(pickerValue) ? pickerValue.value = $event : null),
|
|
107
|
-
readonly: false,
|
|
108
|
-
onConfirm,
|
|
109
|
-
onCancel: _cache[3] || (_cache[3] = ($event) => showPicker.value = false)
|
|
110
|
-
}), null, 16, ["modelValue"])
|
|
111
|
-
]),
|
|
112
|
-
_: 1
|
|
113
|
-
}, 8, ["show"])
|
|
114
|
-
], 64);
|
|
75
|
+
return vue.openBlock(), vue.createBlock(vue.unref(index.MobileField), vue.mergeProps(_ctx.$attrs, {
|
|
76
|
+
modelValue: vue.unref(fieldTextValue),
|
|
77
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => vue.isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
|
|
78
|
+
"is-link": "",
|
|
79
|
+
readonly: "",
|
|
80
|
+
onClick: _cache[4] || (_cache[4] = ($event) => showPicker.value = true)
|
|
81
|
+
}), {
|
|
82
|
+
default: vue.withCtx(() => [
|
|
83
|
+
vue.createVNode(_component_van_popup, {
|
|
84
|
+
show: vue.unref(showPicker),
|
|
85
|
+
"onUpdate:show": _cache[2] || (_cache[2] = ($event) => vue.isRef(showPicker) ? showPicker.value = $event : null),
|
|
86
|
+
"destroy-on-close": "",
|
|
87
|
+
position: "bottom"
|
|
88
|
+
}, {
|
|
89
|
+
default: vue.withCtx(() => [
|
|
90
|
+
vue.createVNode(_component_van_date_picker, vue.mergeProps(_ctx.$attrs, {
|
|
91
|
+
modelValue: vue.unref(pickerValue),
|
|
92
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(pickerValue) ? pickerValue.value = $event : null),
|
|
93
|
+
readonly: false,
|
|
94
|
+
onConfirm,
|
|
95
|
+
onCancel: _cache[1] || (_cache[1] = ($event) => showPicker.value = false)
|
|
96
|
+
}), null, 16, ["modelValue"])
|
|
97
|
+
]),
|
|
98
|
+
_: 1
|
|
99
|
+
}, 8, ["show"])
|
|
100
|
+
]),
|
|
101
|
+
_: 1
|
|
102
|
+
}, 16, ["modelValue"]);
|
|
115
103
|
};
|
|
116
104
|
}
|
|
117
105
|
};
|
|
@@ -13,11 +13,9 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
13
13
|
;/* empty css */
|
|
14
14
|
;/* empty css */
|
|
15
15
|
;/* empty css */
|
|
16
|
-
;/* empty css */
|
|
17
|
-
;/* empty css */
|
|
18
16
|
const vue = require("vue");
|
|
17
|
+
const index = require("../field/index.js");
|
|
19
18
|
const index$2 = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/picker/index.js");
|
|
20
|
-
const index = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/field/index.js");
|
|
21
19
|
const index$1 = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/popup/index.js");
|
|
22
20
|
const _sfc_main = {
|
|
23
21
|
__name: "FieldPicker",
|
|
@@ -71,47 +69,37 @@ const _sfc_main = {
|
|
|
71
69
|
showPicker.value = false;
|
|
72
70
|
};
|
|
73
71
|
return (_ctx, _cache) => {
|
|
74
|
-
const _component_van_field = index.Field;
|
|
75
72
|
const _component_van_picker = index$2.Picker;
|
|
76
73
|
const _component_van_popup = index$1.Popup;
|
|
77
|
-
return vue.openBlock(), vue.
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
"model-value": vue.unref(pickerValue),
|
|
107
|
-
readonly: false,
|
|
108
|
-
onConfirm,
|
|
109
|
-
onCancel: _cache[2] || (_cache[2] = ($event) => showPicker.value = false)
|
|
110
|
-
}), null, 16, ["columns", "columns-field-names", "model-value"])
|
|
111
|
-
]),
|
|
112
|
-
_: 1
|
|
113
|
-
}, 8, ["show"])
|
|
114
|
-
], 64);
|
|
74
|
+
return vue.openBlock(), vue.createBlock(vue.unref(index.MobileField), vue.mergeProps(_ctx.$attrs, {
|
|
75
|
+
modelValue: vue.unref(fieldTextValue),
|
|
76
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => vue.isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
|
|
77
|
+
"is-link": "",
|
|
78
|
+
readonly: "",
|
|
79
|
+
onClick: _cache[3] || (_cache[3] = ($event) => showPicker.value = true)
|
|
80
|
+
}), {
|
|
81
|
+
default: vue.withCtx(() => [
|
|
82
|
+
vue.createVNode(_component_van_popup, {
|
|
83
|
+
show: vue.unref(showPicker),
|
|
84
|
+
"onUpdate:show": _cache[1] || (_cache[1] = ($event) => vue.isRef(showPicker) ? showPicker.value = $event : null),
|
|
85
|
+
"destroy-on-close": "",
|
|
86
|
+
position: "bottom"
|
|
87
|
+
}, {
|
|
88
|
+
default: vue.withCtx(() => [
|
|
89
|
+
vue.createVNode(_component_van_picker, vue.mergeProps(_ctx.$attrs, {
|
|
90
|
+
columns: __props.columns,
|
|
91
|
+
"columns-field-names": __props.columnsFieldNames,
|
|
92
|
+
"model-value": vue.unref(pickerValue),
|
|
93
|
+
readonly: false,
|
|
94
|
+
onConfirm,
|
|
95
|
+
onCancel: _cache[0] || (_cache[0] = ($event) => showPicker.value = false)
|
|
96
|
+
}), null, 16, ["columns", "columns-field-names", "model-value"])
|
|
97
|
+
]),
|
|
98
|
+
_: 1
|
|
99
|
+
}, 8, ["show"])
|
|
100
|
+
]),
|
|
101
|
+
_: 1
|
|
102
|
+
}, 16, ["modelValue"]);
|
|
115
103
|
};
|
|
116
104
|
}
|
|
117
105
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const vue = require("vue");
|
|
4
|
+
const index = require("../field/index.js");
|
|
5
|
+
const index$1 = require("../radioGroup/index.js");
|
|
6
|
+
const _sfc_main = {
|
|
7
|
+
__name: "FieldRadio",
|
|
8
|
+
setup(__props) {
|
|
9
|
+
return (_ctx, _cache) => {
|
|
10
|
+
return vue.openBlock(), vue.createBlock(vue.unref(index.MobileField), vue.normalizeProps(vue.guardReactiveProps(_ctx.$attrs)), {
|
|
11
|
+
input: vue.withCtx(() => [
|
|
12
|
+
vue.createVNode(vue.unref(index$1.MobileRadioGroup), vue.normalizeProps(vue.guardReactiveProps(_ctx.$attrs)), null, 16)
|
|
13
|
+
]),
|
|
14
|
+
_: 1
|
|
15
|
+
}, 16);
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
exports.default = _sfc_main;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const FieldRadio = require("./FieldRadio.vue.js");
|
|
4
|
+
const install = require("../../../utils/install.js");
|
|
5
|
+
const MobileFieldRadio = install.default.withInstall(
|
|
6
|
+
"MobileFieldRadio",
|
|
7
|
+
FieldRadio.default
|
|
8
|
+
);
|
|
9
|
+
exports.MobileFieldRadio = MobileFieldRadio;
|
|
10
|
+
exports.default = MobileFieldRadio;
|
|
@@ -13,12 +13,10 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
13
13
|
;/* empty css */
|
|
14
14
|
;/* empty css */
|
|
15
15
|
;/* empty css */
|
|
16
|
-
;/* empty css */
|
|
17
|
-
;/* empty css */
|
|
18
16
|
const vue = require("vue");
|
|
17
|
+
const index = require("../field/index.js");
|
|
19
18
|
const moment = require("../../../../../../node_modules/.pnpm/moment@2.30.1/node_modules/moment/dist/moment.js");
|
|
20
19
|
const index$2 = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/time-picker/index.js");
|
|
21
|
-
const index = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/field/index.js");
|
|
22
20
|
const index$1 = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/popup/index.js");
|
|
23
21
|
const _sfc_main = {
|
|
24
22
|
__name: "FieldTimePicker",
|
|
@@ -72,46 +70,36 @@ const _sfc_main = {
|
|
|
72
70
|
showPicker.value = false;
|
|
73
71
|
};
|
|
74
72
|
return (_ctx, _cache) => {
|
|
75
|
-
const _component_van_field = index.Field;
|
|
76
73
|
const _component_van_time_picker = index$2.TimePicker;
|
|
77
74
|
const _component_van_popup = index$1.Popup;
|
|
78
|
-
return vue.openBlock(), vue.
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => vue.isRef(pickerValue) ? pickerValue.value = $event : null),
|
|
107
|
-
readonly: false,
|
|
108
|
-
onConfirm,
|
|
109
|
-
onCancel: _cache[3] || (_cache[3] = ($event) => showPicker.value = false)
|
|
110
|
-
}), null, 16, ["modelValue"])
|
|
111
|
-
]),
|
|
112
|
-
_: 1
|
|
113
|
-
}, 8, ["show"])
|
|
114
|
-
], 64);
|
|
75
|
+
return vue.openBlock(), vue.createBlock(vue.unref(index.MobileField), vue.mergeProps(_ctx.$attrs, {
|
|
76
|
+
modelValue: vue.unref(fieldTextValue),
|
|
77
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => vue.isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
|
|
78
|
+
"is-link": "",
|
|
79
|
+
readonly: "",
|
|
80
|
+
onClick: _cache[4] || (_cache[4] = ($event) => showPicker.value = true)
|
|
81
|
+
}), {
|
|
82
|
+
default: vue.withCtx(() => [
|
|
83
|
+
vue.createVNode(_component_van_popup, {
|
|
84
|
+
show: vue.unref(showPicker),
|
|
85
|
+
"onUpdate:show": _cache[2] || (_cache[2] = ($event) => vue.isRef(showPicker) ? showPicker.value = $event : null),
|
|
86
|
+
"destroy-on-close": "",
|
|
87
|
+
position: "bottom"
|
|
88
|
+
}, {
|
|
89
|
+
default: vue.withCtx(() => [
|
|
90
|
+
vue.createVNode(_component_van_time_picker, vue.mergeProps(_ctx.$attrs, {
|
|
91
|
+
modelValue: vue.unref(pickerValue),
|
|
92
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(pickerValue) ? pickerValue.value = $event : null),
|
|
93
|
+
readonly: false,
|
|
94
|
+
onConfirm,
|
|
95
|
+
onCancel: _cache[1] || (_cache[1] = ($event) => showPicker.value = false)
|
|
96
|
+
}), null, 16, ["modelValue"])
|
|
97
|
+
]),
|
|
98
|
+
_: 1
|
|
99
|
+
}, 8, ["show"])
|
|
100
|
+
]),
|
|
101
|
+
_: 1
|
|
102
|
+
}, 16, ["modelValue"]);
|
|
115
103
|
};
|
|
116
104
|
}
|
|
117
105
|
};
|
|
@@ -5,18 +5,32 @@ const parseRule = ({ label, isRequired, ruleType }) => {
|
|
|
5
5
|
if (isRequired) {
|
|
6
6
|
ruleList.push({ required: true, message: `请填写${label}` });
|
|
7
7
|
}
|
|
8
|
+
const errorMessage = `请填写正确的${label}`;
|
|
9
|
+
const validateEmpty = false;
|
|
8
10
|
switch (ruleType) {
|
|
9
11
|
case "email":
|
|
10
12
|
var pattern = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
|
|
11
|
-
ruleList.push({
|
|
13
|
+
ruleList.push({
|
|
14
|
+
pattern,
|
|
15
|
+
message: errorMessage,
|
|
16
|
+
validateEmpty
|
|
17
|
+
});
|
|
12
18
|
break;
|
|
13
19
|
case "phone":
|
|
14
20
|
var pattern = /^((\+?86)|(\(\+86\)))?(1[3-9]\d{9})$/;
|
|
15
|
-
ruleList.push({
|
|
21
|
+
ruleList.push({
|
|
22
|
+
pattern,
|
|
23
|
+
message: errorMessage,
|
|
24
|
+
validateEmpty
|
|
25
|
+
});
|
|
16
26
|
break;
|
|
17
27
|
case "mobile":
|
|
18
28
|
var pattern = /^([0-9]{3,4}-)?[0-9]{7,8}$/;
|
|
19
|
-
ruleList.push({
|
|
29
|
+
ruleList.push({
|
|
30
|
+
pattern,
|
|
31
|
+
message: errorMessage,
|
|
32
|
+
validateEmpty
|
|
33
|
+
});
|
|
20
34
|
break;
|
|
21
35
|
case "mobilephone":
|
|
22
36
|
let validatorMobilephone = function(value) {
|
|
@@ -25,10 +39,14 @@ const parseRule = ({ label, isRequired, ruleType }) => {
|
|
|
25
39
|
if (isMob.test(value) || isPhone.test(value)) {
|
|
26
40
|
return true;
|
|
27
41
|
} else {
|
|
28
|
-
return
|
|
42
|
+
return false;
|
|
29
43
|
}
|
|
30
44
|
};
|
|
31
|
-
ruleList.push({
|
|
45
|
+
ruleList.push({
|
|
46
|
+
validator: validatorMobilephone,
|
|
47
|
+
message: errorMessage,
|
|
48
|
+
validateEmpty
|
|
49
|
+
});
|
|
32
50
|
break;
|
|
33
51
|
case "idNo":
|
|
34
52
|
let validatorIdNo = function(value) {
|
|
@@ -37,26 +55,46 @@ const parseRule = ({ label, isRequired, ruleType }) => {
|
|
|
37
55
|
if (reg15.test(value) || reg18.test(value)) {
|
|
38
56
|
return true;
|
|
39
57
|
} else {
|
|
40
|
-
return
|
|
58
|
+
return false;
|
|
41
59
|
}
|
|
42
60
|
};
|
|
43
|
-
ruleList.push({
|
|
61
|
+
ruleList.push({
|
|
62
|
+
validator: validatorIdNo,
|
|
63
|
+
message: errorMessage,
|
|
64
|
+
validateEmpty
|
|
65
|
+
});
|
|
44
66
|
break;
|
|
45
67
|
case "usci":
|
|
46
68
|
var pattern = /^([0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}|[1-9]\d{14})$/;
|
|
47
|
-
ruleList.push({
|
|
69
|
+
ruleList.push({
|
|
70
|
+
pattern,
|
|
71
|
+
message: errorMessage,
|
|
72
|
+
validateEmpty
|
|
73
|
+
});
|
|
48
74
|
break;
|
|
49
75
|
case "postcode":
|
|
50
76
|
var pattern = /^[0-9]{6}$/;
|
|
51
|
-
ruleList.push({
|
|
77
|
+
ruleList.push({
|
|
78
|
+
pattern,
|
|
79
|
+
message: errorMessage,
|
|
80
|
+
validateEmpty
|
|
81
|
+
});
|
|
52
82
|
break;
|
|
53
83
|
case "fax":
|
|
54
84
|
var pattern = /^([0-9]{3,4}-)?[0-9]{7,8}$/;
|
|
55
|
-
ruleList.push({
|
|
85
|
+
ruleList.push({
|
|
86
|
+
pattern,
|
|
87
|
+
message: errorMessage,
|
|
88
|
+
validateEmpty
|
|
89
|
+
});
|
|
56
90
|
break;
|
|
57
91
|
case "bankcard":
|
|
58
92
|
var pattern = /^[1-9]\d{7,29}$/;
|
|
59
|
-
ruleList.push({
|
|
93
|
+
ruleList.push({
|
|
94
|
+
pattern,
|
|
95
|
+
message: errorMessage,
|
|
96
|
+
validateEmpty
|
|
97
|
+
});
|
|
60
98
|
break;
|
|
61
99
|
}
|
|
62
100
|
return ruleList;
|