monkey-front-core 21.2.5 → 21.2.6

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.
@@ -4129,11 +4129,14 @@ function mapErrorKey(key) {
4129
4129
  phone: 'invalid-phone',
4130
4130
  maxFileSize: 'max-file-size',
4131
4131
  invalidUnlockRegister: 'invalid-unlock-register',
4132
- passwordsNotMatching: 'password-not-matching'
4132
+ passwordsNotMatching: 'password-not-matching',
4133
+ minlength: 'min-length',
4134
+ maxlength: 'max-length'
4133
4135
  };
4134
4136
  return (map[key] ?? key).toUpperCase();
4135
4137
  }
4136
4138
  function mapErrorParams(key, control) {
4139
+ key = key.toLowerCase();
4137
4140
  const map = {
4138
4141
  'invalid-phone': 'phoneAllowed',
4139
4142
  'max-file-size': 'sizeAllowed'
@@ -4142,6 +4145,10 @@ function mapErrorParams(key, control) {
4142
4145
  if (field) {
4143
4146
  return { [field]: control.errors?.[field] };
4144
4147
  }
4148
+ if (key === 'min-length' || key === 'max-length') {
4149
+ const [[, error]] = Object.entries(control?.errors || {});
4150
+ return error;
4151
+ }
4145
4152
  return null;
4146
4153
  }
4147
4154
  class MonkeyEcxErrorMessageDirective {