@morozeckiy/dd-lib 0.7.91 → 0.7.92

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.
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
2
2
  import { EventEmitter, Output, ViewChild, Input, Component, Injectable, InjectionToken, Inject, Pipe, Directive, HostListener, numberAttribute, TemplateRef, ChangeDetectionStrategy, Injector, forwardRef, CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA, Optional, ElementRef, Host, SkipSelf, signal, effect, input } from '@angular/core';
3
3
  import * as i1$4 from '@angular/forms';
4
4
  import { Validators, NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';
5
- import { BehaviorSubject, Subject, throwError, of, fromEvent, combineLatest } from 'rxjs';
5
+ import { BehaviorSubject, Subject, throwError, fromEvent, of, combineLatest } from 'rxjs';
6
6
  import { format, parse, isAfter, isBefore, isValid } from 'date-fns';
7
7
  import * as i1 from '@angular/common/http';
8
8
  import { HttpErrorResponse, HttpHeaders, HttpParams } from '@angular/common/http';
@@ -387,17 +387,17 @@ class ValidatorsService {
387
387
  static getMailValid(el) {
388
388
  const pattern = /^([A-Za-z0-9+_-]+\.)*[A-Za-z0-9+_-]+@[A-Za-z0-9+_-]+(\.[A-Za-z0-9+_-]+)*\.[A-Za-z]{2,6}$/;
389
389
  if (!el?.value) {
390
- return of({
390
+ return {
391
391
  required: 'Это поле обязательно для заполнения',
392
- });
392
+ };
393
393
  }
394
394
  else if (!pattern.test(el.value) && el.value !== 'test_admin' && el.value !== 'admin') {
395
- return of({
395
+ return {
396
396
  email: 'Некорректно введены данные',
397
- });
397
+ };
398
398
  }
399
399
  else {
400
- return of(null);
400
+ return null;
401
401
  }
402
402
  }
403
403
  static getErrorText(error) {