@lideralia/alife-uikit 1.1.216 → 1.1.217
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.
|
@@ -88,7 +88,9 @@ var CardPayInfo = function CardPayInfo(_ref) {
|
|
|
88
88
|
formValid = _useState6[0],
|
|
89
89
|
setFormValid = _useState6[1];
|
|
90
90
|
|
|
91
|
-
var _useState7 = (0, _react.useState)(
|
|
91
|
+
var _useState7 = (0, _react.useState)({
|
|
92
|
+
email_valid: true
|
|
93
|
+
}),
|
|
92
94
|
_useState8 = (0, _slicedToArray2.default)(_useState7, 2),
|
|
93
95
|
emailValid = _useState8[0],
|
|
94
96
|
setEmailValid = _useState8[1];
|
|
@@ -100,19 +102,43 @@ var CardPayInfo = function CardPayInfo(_ref) {
|
|
|
100
102
|
form_valid: true
|
|
101
103
|
});
|
|
102
104
|
} else {
|
|
103
|
-
if (infoState !== null && infoState !== void 0 && infoState.
|
|
105
|
+
if (infoState !== null && infoState !== void 0 && infoState.email && (infoState === null || infoState === void 0 ? void 0 : infoState.email) !== null && (infoState === null || infoState === void 0 ? void 0 : infoState.email) !== "") {
|
|
104
106
|
var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
|
105
107
|
|
|
106
108
|
if (re.test(infoState.email)) {
|
|
107
109
|
setFormValid({
|
|
108
110
|
form_valid: true
|
|
109
111
|
});
|
|
110
|
-
setEmailValid(
|
|
112
|
+
setEmailValid({
|
|
113
|
+
email_valid: true
|
|
114
|
+
});
|
|
111
115
|
} else {
|
|
112
116
|
setFormValid({
|
|
113
117
|
form_valid: false
|
|
114
118
|
});
|
|
115
|
-
setEmailValid(
|
|
119
|
+
setEmailValid({
|
|
120
|
+
email_valid: false
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
if (infoState !== null && infoState !== void 0 && infoState.dni && (infoState === null || infoState === void 0 ? void 0 : infoState.dni) !== null && (infoState === null || infoState === void 0 ? void 0 : infoState.dni) !== "" && infoState !== null && infoState !== void 0 && infoState.email && (infoState === null || infoState === void 0 ? void 0 : infoState.email) !== null && (infoState === null || infoState === void 0 ? void 0 : infoState.email) !== "" && infoState !== null && infoState !== void 0 && infoState.address && (infoState === null || infoState === void 0 ? void 0 : infoState.address) !== null && (infoState === null || infoState === void 0 ? void 0 : infoState.address) !== "" && infoState !== null && infoState !== void 0 && infoState.location && (infoState === null || infoState === void 0 ? void 0 : infoState.location) !== null && (infoState === null || infoState === void 0 ? void 0 : infoState.location) !== "" && infoState !== null && infoState !== void 0 && infoState.cp && (infoState === null || infoState === void 0 ? void 0 : infoState.cp) !== null && (infoState === null || infoState === void 0 ? void 0 : infoState.cp) !== "" && infoState !== null && infoState !== void 0 && infoState.province && (infoState === null || infoState === void 0 ? void 0 : infoState.province) !== null && (infoState === null || infoState === void 0 ? void 0 : infoState.province) !== "" && infoState !== null && infoState !== void 0 && infoState.country && (infoState === null || infoState === void 0 ? void 0 : infoState.country) !== null && (infoState === null || infoState === void 0 ? void 0 : infoState.country) !== "") {
|
|
126
|
+
var _re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
|
127
|
+
|
|
128
|
+
if (_re.test(infoState.email)) {
|
|
129
|
+
setFormValid({
|
|
130
|
+
form_valid: true
|
|
131
|
+
});
|
|
132
|
+
setEmailValid({
|
|
133
|
+
email_valid: true
|
|
134
|
+
});
|
|
135
|
+
} else {
|
|
136
|
+
setFormValid({
|
|
137
|
+
form_valid: false
|
|
138
|
+
});
|
|
139
|
+
setEmailValid({
|
|
140
|
+
email_valid: false
|
|
141
|
+
});
|
|
116
142
|
}
|
|
117
143
|
} else setFormValid({
|
|
118
144
|
form_valid: false
|
|
@@ -285,7 +311,7 @@ CardPayInfo.Body = function (props) {
|
|
|
285
311
|
email: value
|
|
286
312
|
}));
|
|
287
313
|
}
|
|
288
|
-
})), !emailValid && _react.default.createElement(_Typography.Text, {
|
|
314
|
+
})), !emailValid.email_valid && _react.default.createElement(_Typography.Text, {
|
|
289
315
|
sizeText: "display12",
|
|
290
316
|
marginLeft: "15px",
|
|
291
317
|
color: "red"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lideralia/alife-uikit",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.217",
|
|
4
4
|
"description": "Librería y documentación de componentes, basada en el Design System de Alife.",
|
|
5
5
|
"homepage": "https://github.com/lideralia/alife-frontend-components#readme",
|
|
6
6
|
"bugs": {
|