@eeplatform/nuxt-layer-common 1.7.38 → 1.7.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/CHANGELOG.md +12 -0
- package/components/EnrollmentForm.vue +34 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @eeplatform/nuxt-layer-common
|
|
2
2
|
|
|
3
|
+
## 1.7.40
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- bb9a841: Update enrollment form input validations
|
|
8
|
+
|
|
9
|
+
## 1.7.39
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 3287e62: Fix enrollment form parent and guardian contact validation
|
|
14
|
+
|
|
3
15
|
## 1.7.38
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -767,9 +767,12 @@
|
|
|
767
767
|
<v-row no-gutters>
|
|
768
768
|
<InputLabel class="text-capitalize" title="Zip Code" />
|
|
769
769
|
<v-col cols="12">
|
|
770
|
-
<v-
|
|
770
|
+
<v-mask-input
|
|
771
771
|
v-model="enrollment.address.current.zipCode"
|
|
772
|
-
|
|
772
|
+
mask="####"
|
|
773
|
+
placeholder="e.g., 1000"
|
|
774
|
+
:rules="[validZipCode]"
|
|
775
|
+
></v-mask-input>
|
|
773
776
|
</v-col>
|
|
774
777
|
</v-row>
|
|
775
778
|
</v-col>
|
|
@@ -940,10 +943,13 @@
|
|
|
940
943
|
<v-row no-gutters>
|
|
941
944
|
<InputLabel class="text-capitalize" title="Zip Code" />
|
|
942
945
|
<v-col cols="12">
|
|
943
|
-
<v-
|
|
946
|
+
<v-mask-input
|
|
944
947
|
v-model="enrollment.address.permanent.zipCode"
|
|
945
948
|
:readonly="sameAsCurrentAddress"
|
|
946
|
-
|
|
949
|
+
mask="####"
|
|
950
|
+
placeholder="e.g., 1000"
|
|
951
|
+
:rules="[validZipCode]"
|
|
952
|
+
></v-mask-input>
|
|
947
953
|
</v-col>
|
|
948
954
|
</v-row>
|
|
949
955
|
</v-col>
|
|
@@ -1083,6 +1089,7 @@
|
|
|
1083
1089
|
placeholder="09XX-XXX-XXXX"
|
|
1084
1090
|
variant="outlined"
|
|
1085
1091
|
density="comfortable"
|
|
1092
|
+
:rules="[validContactNumber]"
|
|
1086
1093
|
></v-mask-input>
|
|
1087
1094
|
</v-col>
|
|
1088
1095
|
</v-row>
|
|
@@ -1158,6 +1165,7 @@
|
|
|
1158
1165
|
placeholder="09XX-XXX-XXXX"
|
|
1159
1166
|
variant="outlined"
|
|
1160
1167
|
density="comfortable"
|
|
1168
|
+
:rules="[validContactNumber]"
|
|
1161
1169
|
></v-mask-input>
|
|
1162
1170
|
</v-col>
|
|
1163
1171
|
</v-row>
|
|
@@ -1233,6 +1241,7 @@
|
|
|
1233
1241
|
placeholder="09XX-XXX-XXXX"
|
|
1234
1242
|
variant="outlined"
|
|
1235
1243
|
density="comfortable"
|
|
1244
|
+
:rules="[validContactNumber]"
|
|
1236
1245
|
></v-mask-input>
|
|
1237
1246
|
</v-col>
|
|
1238
1247
|
</v-row>
|
|
@@ -1466,6 +1475,27 @@ if (prop.school) {
|
|
|
1466
1475
|
|
|
1467
1476
|
enrollment.value.createdBy = useCookie("user", cookieConfig).value ?? "";
|
|
1468
1477
|
|
|
1478
|
+
function validZipCode(value: string) {
|
|
1479
|
+
if (value && value.length < 4) {
|
|
1480
|
+
return "Zip code must be at least 4 digits.";
|
|
1481
|
+
}
|
|
1482
|
+
return true;
|
|
1483
|
+
}
|
|
1484
|
+
|
|
1485
|
+
function validContactNumber(value: string) {
|
|
1486
|
+
// Contact number must start with '09' and be followed by 9 digits
|
|
1487
|
+
const pattern = /^09\d{9}$/;
|
|
1488
|
+
if (value && !pattern.test(value)) {
|
|
1489
|
+
return "Contact number must start with '09' and be followed by 9 digits.";
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1492
|
+
if (value && value.length < 11) {
|
|
1493
|
+
return "Contact number must be at least 11 digits.";
|
|
1494
|
+
}
|
|
1495
|
+
|
|
1496
|
+
return true;
|
|
1497
|
+
}
|
|
1498
|
+
|
|
1469
1499
|
// Set default country values on mount
|
|
1470
1500
|
if (!enrollment.value.address.current.country) {
|
|
1471
1501
|
enrollment.value.address.current.country = "Philippines";
|