tuain-ng-forms-lib 12.0.84 → 12.0.85
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.
|
@@ -1162,11 +1162,22 @@
|
|
|
1162
1162
|
if (fieldCurrentValue === undefined || fieldCurrentValue === null) {
|
|
1163
1163
|
return true;
|
|
1164
1164
|
}
|
|
1165
|
-
if (
|
|
1165
|
+
if (this.fieldType === this._formConfig.fieldTypes.array
|
|
1166
1166
|
&& Array.isArray(fieldCurrentValue) && fieldCurrentValue.length === 0) {
|
|
1167
1167
|
return true;
|
|
1168
1168
|
}
|
|
1169
1169
|
;
|
|
1170
|
+
if (this.fieldType === this._formConfig.fieldTypes.phone) {
|
|
1171
|
+
if (Array.isArray(fieldCurrentValue) && fieldCurrentValue.length < 2) {
|
|
1172
|
+
return true;
|
|
1173
|
+
}
|
|
1174
|
+
if (Array.isArray(fieldCurrentValue) && fieldCurrentValue.length === 2
|
|
1175
|
+
&& (!fieldCurrentValue[1] || fieldCurrentValue[1].length === 0)) {
|
|
1176
|
+
return true;
|
|
1177
|
+
}
|
|
1178
|
+
return true;
|
|
1179
|
+
}
|
|
1180
|
+
;
|
|
1170
1181
|
return fieldCurrentValue === '';
|
|
1171
1182
|
};
|
|
1172
1183
|
FieldDescriptor.prototype.getValue = function () {
|