monkey-front-core 0.0.576 → 0.0.578

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.
@@ -157,6 +157,8 @@ class MonkeyEcxUtils {
157
157
  return 'RUT';
158
158
  if (country === 'mx')
159
159
  return 'RFC';
160
+ if (country === 'us')
161
+ return 'EIN';
160
162
  return doc.length <= 11 ? 'CPF' : 'CNPJ';
161
163
  }
162
164
  static getDocumentMask(type, country = '') {
@@ -202,6 +204,9 @@ class MonkeyEcxUtils {
202
204
  formated = doc.replace(/^(\d{1,2})(\d{3})(\d{3})(\w{1})$/, '$1.$2.$3-$4');
203
205
  return `${formated}`;
204
206
  }
207
+ if (country === 'us') {
208
+ return doc;
209
+ }
205
210
  if (doc.length === 14) {
206
211
  formated = doc
207
212
  .replace(/^(\d{2})(\d)/, '$1.$2')
@@ -1575,7 +1580,7 @@ function validateFullName(control) {
1575
1580
  const fullName = value.split(/\s+/);
1576
1581
  const hasShortPart = fullName.some(part => part.length < 2);
1577
1582
  if (fullName.length < 2 || hasShortPart) {
1578
- return { fullNameIncompleted: true };
1583
+ return { fullName: true };
1579
1584
  }
1580
1585
  return null;
1581
1586
  }