monkey-front-core 0.0.259 → 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.
@@ -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
- return `${this.handleOnlyNumbers(zipCode)}`.length === 8;
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';