onshore-forms 0.0.56 → 0.0.58

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.
@@ -1269,6 +1269,9 @@ class OnshoreFormSortItemComponent {
1269
1269
  this.disabled = isDisabled;
1270
1270
  }
1271
1271
  ngOnInit() {
1272
+ this.ngControl.control?.valueChanges.pipe(debounceTime(100), distinctUntilChanged(), skip(1)).subscribe(newValue => {
1273
+ this.ngControl?.control.setValue(newValue);
1274
+ });
1272
1275
  if (this.ngControl.control?.value == '' && this.formTemplate.default != undefined) {
1273
1276
  this.ngControl.control?.setValue(this.formTemplate.default);
1274
1277
  this.sortItems = this.formTemplate.default;
@@ -1458,7 +1461,7 @@ OnshoreValidators.numeric = (control) => {
1458
1461
  return /^[0-9]*$/.test(control.value) ? null : { numeric: true };
1459
1462
  };
1460
1463
  OnshoreValidators.email = (control) => {
1461
- return /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/.test(control.value) ? null : { email: true };
1464
+ return /^([\w-\.]+@([\w-]+\.)+[\w-]{2,10})?$/.test(control.value) ? null : { email: true };
1462
1465
  };
1463
1466
  OnshoreValidators.cleanComment = (control) => {
1464
1467
  return /[A-Z]{5}\d{4}[A-Z]{1}/.test(control.value) ? null : { cleanComment: true };