tg-core-components 6.2.0-crypto.0 → 6.2.0-edit-profile.0
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/lib/WithValidation/rules/blacklistedCharacters.js +3 -0
- package/es/lib/WithValidation/rules/noSpecialCharacters.js +3 -0
- package/es/lib/WithValidation/rules/phone.js +2 -2
- package/es/widgets/AccountDetail/index.js +106 -38
- package/lib/lib/WithValidation/rules/blacklistedCharacters.js +9 -0
- package/lib/lib/WithValidation/rules/noSpecialCharacters.js +9 -0
- package/lib/lib/WithValidation/rules/phone.js +2 -2
- package/lib/widgets/AccountDetail/index.js +118 -38
- package/package.json +2 -2
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export default (function (
|
|
2
|
-
return
|
|
1
|
+
export default (function (value) {
|
|
2
|
+
return value.match(/^\+?\d{9,17}$/);
|
|
3
3
|
});
|
|
@@ -3,6 +3,10 @@ import compose from 'recompose/compose';
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { injectIntl } from 'react-intl';
|
|
5
5
|
import require from '../../lib/WithValidation/rules/required';
|
|
6
|
+
import phone from '../../lib/WithValidation/rules/phone';
|
|
7
|
+
import blacklistedCharacters from '../../lib/WithValidation/rules/blacklistedCharacters';
|
|
8
|
+
import noSpecialCharacters from '../../lib/WithValidation/rules/noSpecialCharacters';
|
|
9
|
+
import stringWithoutNumbers from '../../lib/WithValidation/rules/stringWithoutNumbers';
|
|
6
10
|
import WithValidation from '../../lib/WithValidation';
|
|
7
11
|
import Input from '../../components/Input';
|
|
8
12
|
import Select from '../../components/Select';
|
|
@@ -11,6 +15,32 @@ import Button from '../../components/Button';
|
|
|
11
15
|
import countryEmojiFlags from '../../misc/countryEmojiFlags';
|
|
12
16
|
import Icon from '../../components/Icon';
|
|
13
17
|
|
|
18
|
+
var genders = [{
|
|
19
|
+
label: function label(intl) {
|
|
20
|
+
return translate({
|
|
21
|
+
id: 'noun.male',
|
|
22
|
+
defaultMessage: 'Male'
|
|
23
|
+
}, intl);
|
|
24
|
+
},
|
|
25
|
+
value: 'Male'
|
|
26
|
+
}, {
|
|
27
|
+
label: function label(intl) {
|
|
28
|
+
return translate({
|
|
29
|
+
id: 'noun.female',
|
|
30
|
+
defaultMessage: 'Female'
|
|
31
|
+
}, intl);
|
|
32
|
+
},
|
|
33
|
+
value: 'Female'
|
|
34
|
+
}, {
|
|
35
|
+
label: function label(intl) {
|
|
36
|
+
return translate({
|
|
37
|
+
id: 'noun.other',
|
|
38
|
+
defaultMessage: 'Other'
|
|
39
|
+
}, intl);
|
|
40
|
+
},
|
|
41
|
+
value: 'Other'
|
|
42
|
+
}];
|
|
43
|
+
|
|
14
44
|
var AccountDetail = function AccountDetail(_ref) {
|
|
15
45
|
var data = _ref.data,
|
|
16
46
|
intl = _ref.intl,
|
|
@@ -18,7 +48,8 @@ var AccountDetail = function AccountDetail(_ref) {
|
|
|
18
48
|
onSubmit = _ref.onSubmit,
|
|
19
49
|
jurisdiction = _ref.jurisdiction,
|
|
20
50
|
countries = _ref.countries,
|
|
21
|
-
isLoading = _ref.isLoading
|
|
51
|
+
isLoading = _ref.isLoading,
|
|
52
|
+
isComplete = _ref.isComplete;
|
|
22
53
|
|
|
23
54
|
return React.createElement(
|
|
24
55
|
'form',
|
|
@@ -93,33 +124,24 @@ var AccountDetail = function AccountDetail(_ref) {
|
|
|
93
124
|
React.createElement(
|
|
94
125
|
Select,
|
|
95
126
|
{
|
|
96
|
-
disabled:
|
|
127
|
+
disabled: isComplete,
|
|
97
128
|
className: 'layout-item-6',
|
|
98
|
-
value:
|
|
99
|
-
return c.value === data.Country;
|
|
100
|
-
}) && countries.value.find(function (c) {
|
|
101
|
-
return c.value === data.Country;
|
|
102
|
-
}).value,
|
|
129
|
+
value: data.Country,
|
|
103
130
|
label: translate({
|
|
104
131
|
id: 'title.country',
|
|
105
132
|
defaultMessage: 'Country'
|
|
106
133
|
}, intl),
|
|
107
134
|
name: 'Country',
|
|
108
135
|
icon: React.createElement(Icon, { icon: 'flag' }) },
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
return c.value === data.Country;
|
|
119
|
-
}) && countries.value.find(function (c) {
|
|
120
|
-
return c.value === data.Country;
|
|
121
|
-
}).label
|
|
122
|
-
)
|
|
136
|
+
countries.sort(function (a, b) {
|
|
137
|
+
return a.label.localeCompare(b.label);
|
|
138
|
+
}).map(function (c) {
|
|
139
|
+
return React.createElement(
|
|
140
|
+
Select.Option,
|
|
141
|
+
{ key: c.value, value: c.value },
|
|
142
|
+
c.label
|
|
143
|
+
);
|
|
144
|
+
})
|
|
123
145
|
),
|
|
124
146
|
React.createElement(Input, {
|
|
125
147
|
disabled: true,
|
|
@@ -132,15 +154,6 @@ var AccountDetail = function AccountDetail(_ref) {
|
|
|
132
154
|
name: 'BirthDate'
|
|
133
155
|
})
|
|
134
156
|
),
|
|
135
|
-
React.createElement(Input, {
|
|
136
|
-
disabled: true,
|
|
137
|
-
value: data.Email,
|
|
138
|
-
label: translate({
|
|
139
|
-
id: 'title.email',
|
|
140
|
-
defaultMessage: 'Email'
|
|
141
|
-
}, intl),
|
|
142
|
-
name: 'Email'
|
|
143
|
-
}),
|
|
144
157
|
React.createElement(Input, {
|
|
145
158
|
value: data.MobilePhoneNumber,
|
|
146
159
|
type: 'tel',
|
|
@@ -148,11 +161,61 @@ var AccountDetail = function AccountDetail(_ref) {
|
|
|
148
161
|
id: 'title.mobile_number',
|
|
149
162
|
defaultMessage: 'Mobile number'
|
|
150
163
|
}, intl),
|
|
164
|
+
callingCodes: !data.MobilePhoneNumber && countries ? countries.sort(function (a, b) {
|
|
165
|
+
return Number(a.callingCode) - Number(b.callingCode);
|
|
166
|
+
}).map(function (i) {
|
|
167
|
+
return {
|
|
168
|
+
value: '00' + i.callingCode,
|
|
169
|
+
label: '+' + i.callingCode + ' ' + (countryEmojiFlags[i.value] || '')
|
|
170
|
+
};
|
|
171
|
+
}) : [],
|
|
151
172
|
name: 'MobilePhoneNumber',
|
|
152
173
|
autoComplete: 'off',
|
|
153
174
|
status: errors.MobilePhoneNumber && 'failure' || 'idle',
|
|
154
175
|
statusText: errors.MobilePhoneNumber && translate({ id: errors.MobilePhoneNumber }, intl)
|
|
155
176
|
}),
|
|
177
|
+
React.createElement(
|
|
178
|
+
'div',
|
|
179
|
+
{ className: 'layout-item' },
|
|
180
|
+
React.createElement(Input, {
|
|
181
|
+
className: 'layout-item-6',
|
|
182
|
+
disabled: true,
|
|
183
|
+
value: data.Email,
|
|
184
|
+
label: translate({
|
|
185
|
+
id: 'title.email',
|
|
186
|
+
defaultMessage: 'Email'
|
|
187
|
+
}, intl),
|
|
188
|
+
name: 'Email'
|
|
189
|
+
}),
|
|
190
|
+
React.createElement(
|
|
191
|
+
Select,
|
|
192
|
+
{
|
|
193
|
+
className: 'layout-item-6',
|
|
194
|
+
value: data.Gender,
|
|
195
|
+
label: translate({
|
|
196
|
+
id: 'title.gender',
|
|
197
|
+
defaultMessage: 'Gender'
|
|
198
|
+
}, intl),
|
|
199
|
+
name: 'Gender',
|
|
200
|
+
status: errors.Gender && 'failure' || 'idle',
|
|
201
|
+
statusText: errors.Gender && translate({ id: errors.Gender }, intl) },
|
|
202
|
+
React.createElement(
|
|
203
|
+
Select.Option,
|
|
204
|
+
{ value: '', disabled: true },
|
|
205
|
+
translate({
|
|
206
|
+
id: 'label.select-gender',
|
|
207
|
+
defaultMessage: 'Select gender'
|
|
208
|
+
}, intl)
|
|
209
|
+
),
|
|
210
|
+
genders.map(function (gender) {
|
|
211
|
+
return React.createElement(
|
|
212
|
+
Select.Option,
|
|
213
|
+
{ value: gender.value },
|
|
214
|
+
gender.label(intl)
|
|
215
|
+
);
|
|
216
|
+
})
|
|
217
|
+
)
|
|
218
|
+
),
|
|
156
219
|
!['sga', 'dga'].includes(jurisdiction) && React.createElement(
|
|
157
220
|
Fragment,
|
|
158
221
|
null,
|
|
@@ -167,7 +230,7 @@ var AccountDetail = function AccountDetail(_ref) {
|
|
|
167
230
|
name: 'Password',
|
|
168
231
|
status: errors.Password && 'failure' || 'idle',
|
|
169
232
|
statusText: errors.Password && translate({ id: errors.Password }, intl),
|
|
170
|
-
|
|
233
|
+
autocomplete: 'new-password'
|
|
171
234
|
})
|
|
172
235
|
),
|
|
173
236
|
React.createElement(
|
|
@@ -198,7 +261,9 @@ AccountDetail.propTypes = {
|
|
|
198
261
|
/** Array of validation errors where the error display depends on which invalid rule it breaks */
|
|
199
262
|
error: PropTypes.array,
|
|
200
263
|
/** The submission function firing when submitting the form */
|
|
201
|
-
onSubmit: PropTypes.func
|
|
264
|
+
onSubmit: PropTypes.func,
|
|
265
|
+
/** If the user profile is complete or not */
|
|
266
|
+
isComplete: PropTypes.bool
|
|
202
267
|
};
|
|
203
268
|
|
|
204
269
|
AccountDetail.defaultProps = {
|
|
@@ -208,15 +273,18 @@ AccountDetail.defaultProps = {
|
|
|
208
273
|
value: '',
|
|
209
274
|
name: '',
|
|
210
275
|
error: [],
|
|
211
|
-
onSubmit: Function
|
|
276
|
+
onSubmit: Function,
|
|
277
|
+
isComplete: false
|
|
212
278
|
};
|
|
213
279
|
|
|
214
280
|
var rules = {
|
|
215
|
-
MobilePhoneNumber: [[require, 'error.empty.mobilePhoneNumber']],
|
|
216
|
-
Address1: [[require, 'error.empty.address']],
|
|
217
|
-
Zip: [[require, 'error.empty.zip_code']],
|
|
218
|
-
City: [[require, 'error.empty.city']],
|
|
219
|
-
Password: [[require, 'error.empty.password']]
|
|
281
|
+
MobilePhoneNumber: [[require, 'error.empty.mobilePhoneNumber'], [phone, 'error.condition.phone']],
|
|
282
|
+
Address1: [[require, 'error.empty.address'], [blacklistedCharacters, 'error.format.address']],
|
|
283
|
+
Zip: [[require, 'error.empty.zip_code'], [noSpecialCharacters, 'error.format.zip']],
|
|
284
|
+
City: [[require, 'error.empty.city'], [stringWithoutNumbers, 'error.invalid.city'], [blacklistedCharacters, 'error.invalid.city']],
|
|
285
|
+
Password: [[require, 'error.empty.password']],
|
|
286
|
+
Country: [[require, 'error.empty.country']],
|
|
287
|
+
Gender: [[require, 'error.empty.gender']]
|
|
220
288
|
};
|
|
221
289
|
|
|
222
290
|
export default compose(WithValidation(rules), injectIntl)(AccountDetail);
|
|
@@ -22,6 +22,22 @@ var _required = require('../../lib/WithValidation/rules/required');
|
|
|
22
22
|
|
|
23
23
|
var _required2 = _interopRequireDefault(_required);
|
|
24
24
|
|
|
25
|
+
var _phone = require('../../lib/WithValidation/rules/phone');
|
|
26
|
+
|
|
27
|
+
var _phone2 = _interopRequireDefault(_phone);
|
|
28
|
+
|
|
29
|
+
var _blacklistedCharacters = require('../../lib/WithValidation/rules/blacklistedCharacters');
|
|
30
|
+
|
|
31
|
+
var _blacklistedCharacters2 = _interopRequireDefault(_blacklistedCharacters);
|
|
32
|
+
|
|
33
|
+
var _noSpecialCharacters = require('../../lib/WithValidation/rules/noSpecialCharacters');
|
|
34
|
+
|
|
35
|
+
var _noSpecialCharacters2 = _interopRequireDefault(_noSpecialCharacters);
|
|
36
|
+
|
|
37
|
+
var _stringWithoutNumbers = require('../../lib/WithValidation/rules/stringWithoutNumbers');
|
|
38
|
+
|
|
39
|
+
var _stringWithoutNumbers2 = _interopRequireDefault(_stringWithoutNumbers);
|
|
40
|
+
|
|
25
41
|
var _WithValidation = require('../../lib/WithValidation');
|
|
26
42
|
|
|
27
43
|
var _WithValidation2 = _interopRequireDefault(_WithValidation);
|
|
@@ -52,6 +68,32 @@ var _Icon2 = _interopRequireDefault(_Icon);
|
|
|
52
68
|
|
|
53
69
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
54
70
|
|
|
71
|
+
var genders = [{
|
|
72
|
+
label: function label(intl) {
|
|
73
|
+
return (0, _translate2.default)({
|
|
74
|
+
id: 'noun.male',
|
|
75
|
+
defaultMessage: 'Male'
|
|
76
|
+
}, intl);
|
|
77
|
+
},
|
|
78
|
+
value: 'Male'
|
|
79
|
+
}, {
|
|
80
|
+
label: function label(intl) {
|
|
81
|
+
return (0, _translate2.default)({
|
|
82
|
+
id: 'noun.female',
|
|
83
|
+
defaultMessage: 'Female'
|
|
84
|
+
}, intl);
|
|
85
|
+
},
|
|
86
|
+
value: 'Female'
|
|
87
|
+
}, {
|
|
88
|
+
label: function label(intl) {
|
|
89
|
+
return (0, _translate2.default)({
|
|
90
|
+
id: 'noun.other',
|
|
91
|
+
defaultMessage: 'Other'
|
|
92
|
+
}, intl);
|
|
93
|
+
},
|
|
94
|
+
value: 'Other'
|
|
95
|
+
}];
|
|
96
|
+
|
|
55
97
|
var AccountDetail = function AccountDetail(_ref) {
|
|
56
98
|
var data = _ref.data,
|
|
57
99
|
intl = _ref.intl,
|
|
@@ -59,7 +101,8 @@ var AccountDetail = function AccountDetail(_ref) {
|
|
|
59
101
|
onSubmit = _ref.onSubmit,
|
|
60
102
|
jurisdiction = _ref.jurisdiction,
|
|
61
103
|
countries = _ref.countries,
|
|
62
|
-
isLoading = _ref.isLoading
|
|
104
|
+
isLoading = _ref.isLoading,
|
|
105
|
+
isComplete = _ref.isComplete;
|
|
63
106
|
|
|
64
107
|
return _react2.default.createElement(
|
|
65
108
|
'form',
|
|
@@ -134,33 +177,24 @@ var AccountDetail = function AccountDetail(_ref) {
|
|
|
134
177
|
_react2.default.createElement(
|
|
135
178
|
_Select2.default,
|
|
136
179
|
{
|
|
137
|
-
disabled:
|
|
180
|
+
disabled: isComplete,
|
|
138
181
|
className: 'layout-item-6',
|
|
139
|
-
value:
|
|
140
|
-
return c.value === data.Country;
|
|
141
|
-
}) && countries.value.find(function (c) {
|
|
142
|
-
return c.value === data.Country;
|
|
143
|
-
}).value,
|
|
182
|
+
value: data.Country,
|
|
144
183
|
label: (0, _translate2.default)({
|
|
145
184
|
id: 'title.country',
|
|
146
185
|
defaultMessage: 'Country'
|
|
147
186
|
}, intl),
|
|
148
187
|
name: 'Country',
|
|
149
188
|
icon: _react2.default.createElement(_Icon2.default, { icon: 'flag' }) },
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
return c.value === data.Country;
|
|
160
|
-
}) && countries.value.find(function (c) {
|
|
161
|
-
return c.value === data.Country;
|
|
162
|
-
}).label
|
|
163
|
-
)
|
|
189
|
+
countries.sort(function (a, b) {
|
|
190
|
+
return a.label.localeCompare(b.label);
|
|
191
|
+
}).map(function (c) {
|
|
192
|
+
return _react2.default.createElement(
|
|
193
|
+
_Select2.default.Option,
|
|
194
|
+
{ key: c.value, value: c.value },
|
|
195
|
+
c.label
|
|
196
|
+
);
|
|
197
|
+
})
|
|
164
198
|
),
|
|
165
199
|
_react2.default.createElement(_Input2.default, {
|
|
166
200
|
disabled: true,
|
|
@@ -173,15 +207,6 @@ var AccountDetail = function AccountDetail(_ref) {
|
|
|
173
207
|
name: 'BirthDate'
|
|
174
208
|
})
|
|
175
209
|
),
|
|
176
|
-
_react2.default.createElement(_Input2.default, {
|
|
177
|
-
disabled: true,
|
|
178
|
-
value: data.Email,
|
|
179
|
-
label: (0, _translate2.default)({
|
|
180
|
-
id: 'title.email',
|
|
181
|
-
defaultMessage: 'Email'
|
|
182
|
-
}, intl),
|
|
183
|
-
name: 'Email'
|
|
184
|
-
}),
|
|
185
210
|
_react2.default.createElement(_Input2.default, {
|
|
186
211
|
value: data.MobilePhoneNumber,
|
|
187
212
|
type: 'tel',
|
|
@@ -189,11 +214,61 @@ var AccountDetail = function AccountDetail(_ref) {
|
|
|
189
214
|
id: 'title.mobile_number',
|
|
190
215
|
defaultMessage: 'Mobile number'
|
|
191
216
|
}, intl),
|
|
217
|
+
callingCodes: !data.MobilePhoneNumber && countries ? countries.sort(function (a, b) {
|
|
218
|
+
return Number(a.callingCode) - Number(b.callingCode);
|
|
219
|
+
}).map(function (i) {
|
|
220
|
+
return {
|
|
221
|
+
value: '00' + i.callingCode,
|
|
222
|
+
label: '+' + i.callingCode + ' ' + (_countryEmojiFlags2.default[i.value] || '')
|
|
223
|
+
};
|
|
224
|
+
}) : [],
|
|
192
225
|
name: 'MobilePhoneNumber',
|
|
193
226
|
autoComplete: 'off',
|
|
194
227
|
status: errors.MobilePhoneNumber && 'failure' || 'idle',
|
|
195
228
|
statusText: errors.MobilePhoneNumber && (0, _translate2.default)({ id: errors.MobilePhoneNumber }, intl)
|
|
196
229
|
}),
|
|
230
|
+
_react2.default.createElement(
|
|
231
|
+
'div',
|
|
232
|
+
{ className: 'layout-item' },
|
|
233
|
+
_react2.default.createElement(_Input2.default, {
|
|
234
|
+
className: 'layout-item-6',
|
|
235
|
+
disabled: true,
|
|
236
|
+
value: data.Email,
|
|
237
|
+
label: (0, _translate2.default)({
|
|
238
|
+
id: 'title.email',
|
|
239
|
+
defaultMessage: 'Email'
|
|
240
|
+
}, intl),
|
|
241
|
+
name: 'Email'
|
|
242
|
+
}),
|
|
243
|
+
_react2.default.createElement(
|
|
244
|
+
_Select2.default,
|
|
245
|
+
{
|
|
246
|
+
className: 'layout-item-6',
|
|
247
|
+
value: data.Gender,
|
|
248
|
+
label: (0, _translate2.default)({
|
|
249
|
+
id: 'title.gender',
|
|
250
|
+
defaultMessage: 'Gender'
|
|
251
|
+
}, intl),
|
|
252
|
+
name: 'Gender',
|
|
253
|
+
status: errors.Gender && 'failure' || 'idle',
|
|
254
|
+
statusText: errors.Gender && (0, _translate2.default)({ id: errors.Gender }, intl) },
|
|
255
|
+
_react2.default.createElement(
|
|
256
|
+
_Select2.default.Option,
|
|
257
|
+
{ value: '', disabled: true },
|
|
258
|
+
(0, _translate2.default)({
|
|
259
|
+
id: 'label.select-gender',
|
|
260
|
+
defaultMessage: 'Select gender'
|
|
261
|
+
}, intl)
|
|
262
|
+
),
|
|
263
|
+
genders.map(function (gender) {
|
|
264
|
+
return _react2.default.createElement(
|
|
265
|
+
_Select2.default.Option,
|
|
266
|
+
{ value: gender.value },
|
|
267
|
+
gender.label(intl)
|
|
268
|
+
);
|
|
269
|
+
})
|
|
270
|
+
)
|
|
271
|
+
),
|
|
197
272
|
!['sga', 'dga'].includes(jurisdiction) && _react2.default.createElement(
|
|
198
273
|
_react.Fragment,
|
|
199
274
|
null,
|
|
@@ -208,7 +283,7 @@ var AccountDetail = function AccountDetail(_ref) {
|
|
|
208
283
|
name: 'Password',
|
|
209
284
|
status: errors.Password && 'failure' || 'idle',
|
|
210
285
|
statusText: errors.Password && (0, _translate2.default)({ id: errors.Password }, intl),
|
|
211
|
-
|
|
286
|
+
autocomplete: 'new-password'
|
|
212
287
|
})
|
|
213
288
|
),
|
|
214
289
|
_react2.default.createElement(
|
|
@@ -239,7 +314,9 @@ AccountDetail.propTypes = {
|
|
|
239
314
|
/** Array of validation errors where the error display depends on which invalid rule it breaks */
|
|
240
315
|
error: _propTypes2.default.array,
|
|
241
316
|
/** The submission function firing when submitting the form */
|
|
242
|
-
onSubmit: _propTypes2.default.func
|
|
317
|
+
onSubmit: _propTypes2.default.func,
|
|
318
|
+
/** If the user profile is complete or not */
|
|
319
|
+
isComplete: _propTypes2.default.bool
|
|
243
320
|
};
|
|
244
321
|
|
|
245
322
|
AccountDetail.defaultProps = {
|
|
@@ -249,15 +326,18 @@ AccountDetail.defaultProps = {
|
|
|
249
326
|
value: '',
|
|
250
327
|
name: '',
|
|
251
328
|
error: [],
|
|
252
|
-
onSubmit: Function
|
|
329
|
+
onSubmit: Function,
|
|
330
|
+
isComplete: false
|
|
253
331
|
};
|
|
254
332
|
|
|
255
333
|
var rules = {
|
|
256
|
-
MobilePhoneNumber: [[_required2.default, 'error.empty.mobilePhoneNumber']],
|
|
257
|
-
Address1: [[_required2.default, 'error.empty.address']],
|
|
258
|
-
Zip: [[_required2.default, 'error.empty.zip_code']],
|
|
259
|
-
City: [[_required2.default, 'error.empty.city']],
|
|
260
|
-
Password: [[_required2.default, 'error.empty.password']]
|
|
334
|
+
MobilePhoneNumber: [[_required2.default, 'error.empty.mobilePhoneNumber'], [_phone2.default, 'error.condition.phone']],
|
|
335
|
+
Address1: [[_required2.default, 'error.empty.address'], [_blacklistedCharacters2.default, 'error.format.address']],
|
|
336
|
+
Zip: [[_required2.default, 'error.empty.zip_code'], [_noSpecialCharacters2.default, 'error.format.zip']],
|
|
337
|
+
City: [[_required2.default, 'error.empty.city'], [_stringWithoutNumbers2.default, 'error.invalid.city'], [_blacklistedCharacters2.default, 'error.invalid.city']],
|
|
338
|
+
Password: [[_required2.default, 'error.empty.password']],
|
|
339
|
+
Country: [[_required2.default, 'error.empty.country']],
|
|
340
|
+
Gender: [[_required2.default, 'error.empty.gender']]
|
|
261
341
|
};
|
|
262
342
|
|
|
263
343
|
exports.default = (0, _compose2.default)((0, _WithValidation2.default)(rules), _reactIntl.injectIntl)(AccountDetail);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tg-core-components",
|
|
3
|
-
"version": "6.2.0-
|
|
3
|
+
"version": "6.2.0-edit-profile.0",
|
|
4
4
|
"description": "tg-core-components",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"webpack": "^3.0.0",
|
|
77
77
|
"webpack-blocks": "^1.0.0"
|
|
78
78
|
},
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "2ec4bead075692356f774233854cf030e9129efd"
|
|
80
80
|
}
|