monkey-front-core 0.0.258 → 0.0.260
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/esm2020/lib/core/utils/utils.mjs +4 -3
- package/fesm2015/monkey-front-core.mjs +3 -2
- package/fesm2015/monkey-front-core.mjs.map +1 -1
- package/fesm2020/monkey-front-core.mjs +3 -2
- package/fesm2020/monkey-front-core.mjs.map +1 -1
- package/lib/core/utils/utils.d.ts +1 -1
- package/monkey-front-core-0.0.260.tgz +0 -0
- package/package.json +3 -3
- package/monkey-front-core-0.0.258.tgz +0 -0
|
@@ -196,8 +196,9 @@ class MonkeyEcxUtils {
|
|
|
196
196
|
const regex = new RegExp(/^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)+[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,10}(:[0-9]{1,5})?(\/.*)?$/gm);
|
|
197
197
|
return regex.test(txt);
|
|
198
198
|
}
|
|
199
|
-
static isValidZipCode(zipCode) {
|
|
200
|
-
|
|
199
|
+
static isValidZipCode(zipCode, country) {
|
|
200
|
+
const length = (country === 'cl') ? 7 : 8;
|
|
201
|
+
return `${this.handleOnlyNumbers(zipCode)}`.length === length;
|
|
201
202
|
}
|
|
202
203
|
static getRandomString(len, charSet) {
|
|
203
204
|
charSet = charSet || 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|