ecomlab-components-next 0.1.210 → 0.1.211
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.
|
@@ -179,14 +179,15 @@ var ModalBitrixForm = exports.ModalBitrixForm = function ModalBitrixForm(_ref) {
|
|
|
179
179
|
return setInputValue(function (prev) {
|
|
180
180
|
return _objectSpread(_objectSpread({}, prev), {}, _defineProperty({}, id, e));
|
|
181
181
|
});
|
|
182
|
-
}
|
|
183
|
-
countrySelect
|
|
184
|
-
countryDefault
|
|
182
|
+
}
|
|
183
|
+
// countrySelect={inputType === 'tel'}
|
|
184
|
+
// countryDefault={'TH'}
|
|
185
|
+
,
|
|
185
186
|
autoComplete: false,
|
|
186
187
|
err: err === null || err === void 0 ? void 0 : err[id],
|
|
187
188
|
required: required,
|
|
188
189
|
textErr: err === null || err === void 0 ? void 0 : err[id],
|
|
189
|
-
mask:
|
|
190
|
+
mask: '+{7} (000) 000-00-00'
|
|
190
191
|
});
|
|
191
192
|
}
|
|
192
193
|
})));
|
|
@@ -204,7 +205,7 @@ var ModalBitrixForm = exports.ModalBitrixForm = function ModalBitrixForm(_ref) {
|
|
|
204
205
|
error[id] = 'Неверный email';
|
|
205
206
|
}
|
|
206
207
|
} else if (inputType == 'tel') {
|
|
207
|
-
var regex =
|
|
208
|
+
var regex = /^\+7 \(\d{3}\) \d{3}-\d{2}-\d{2}$/;
|
|
208
209
|
if (!regex.test(inputValue === null || inputValue === void 0 ? void 0 : inputValue[id])) {
|
|
209
210
|
error[id] = 'Неверный телефон';
|
|
210
211
|
}
|