@astral/validations 4.13.0 → 4.13.1
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.
- package/README.md +1 -1
- package/any/any.d.ts +1 -1
- package/array/array.d.ts +1 -1
- package/array/array.js +1 -1
- package/array/constants.d.ts +1 -1
- package/arrayItem/arrayItem.d.ts +1 -1
- package/boolean/boolean.d.ts +1 -1
- package/boolean/constants.d.ts +1 -1
- package/containsDifferentCases/constants.d.ts +1 -1
- package/containsNumbers/constants.d.ts +1 -1
- package/containsPunctuationMarks/constants.d.ts +1 -1
- package/core/compose/compose.d.ts +1 -1
- package/core/compose/compose.js +1 -1
- package/core/composeAsync/composeAsync.d.ts +1 -1
- package/core/context/createContext/createContext.d.ts +3 -3
- package/core/context/types.d.ts +2 -2
- package/core/errors/ArrayError/ArrayError.d.ts +2 -2
- package/core/errors/ArrayError/ArrayError.js +1 -1
- package/core/errors/ArrayError/createArrayError/createArrayError.d.ts +1 -1
- package/core/errors/ArrayError/createArrayError/createArrayError.js +1 -1
- package/core/errors/ErrorMap/ErrorMap.d.ts +2 -2
- package/core/errors/ErrorMap/ErrorMap.js +1 -1
- package/core/errors/ErrorMap/createErrorMap/createErrorMap.d.ts +1 -1
- package/core/errors/ErrorMap/createErrorMap/createErrorMap.js +1 -1
- package/core/errors/SimpleError/SimpleError.d.ts +1 -1
- package/core/errors/SimpleError/createSimpleError/createSimpleError.d.ts +1 -1
- package/core/errors/constants.d.ts +1 -1
- package/core/errors/createErrorCode/createErrorCode.d.ts +1 -1
- package/core/errors/types.d.ts +3 -3
- package/core/guard/createGuard/createGuard.d.ts +2 -2
- package/core/rule/callAsyncRule/callAsyncRule.d.ts +3 -3
- package/core/rule/callRule/callRule.d.ts +3 -3
- package/core/rule/createRule/createRule.d.ts +3 -3
- package/core/rule/required/constants.d.ts +1 -1
- package/core/rule/types.d.ts +2 -2
- package/core/types.d.ts +1 -1
- package/date/constants.d.ts +1 -1
- package/date/date.d.ts +1 -1
- package/deepPartial/deepPartial.d.ts +1 -1
- package/email/constants.d.ts +1 -1
- package/guid/constants.d.ts +1 -1
- package/innFL/constants.d.ts +1 -1
- package/innFL/innFL.d.ts +1 -1
- package/innIP/constants.d.ts +1 -1
- package/innIP/innIP.d.ts +1 -1
- package/innTwelveSymbols/constants.d.ts +1 -1
- package/innTwelveSymbols/innTwelveSymbols.d.ts +1 -1
- package/innUL/constants.d.ts +1 -1
- package/innUL/innUL.d.ts +1 -1
- package/integer/constants.d.ts +1 -1
- package/kpp/constants.d.ts +1 -1
- package/kpp/kpp.d.ts +1 -1
- package/length/constants.d.ts +1 -1
- package/max/constants.d.ts +1 -1
- package/max/max.d.ts +1 -1
- package/min/constants.d.ts +1 -1
- package/min/min.d.ts +1 -1
- package/minYearsOld/constants.d.ts +1 -1
- package/mobilePhone/constants.d.ts +1 -1
- package/mobilePhone/mobilePhone.d.ts +1 -1
- package/number/constants.d.ts +1 -1
- package/number/number.d.ts +1 -1
- package/object/constants.d.ts +1 -1
- package/object/isEmptyErrors/isEmptyErrors.d.ts +1 -1
- package/object/object.d.ts +1 -1
- package/object/objectAsync/objectAsync.d.ts +1 -1
- package/ogrnIP/constants.d.ts +1 -1
- package/ogrnIP/ogrnIP.d.ts +1 -1
- package/ogrnUL/constants.d.ts +1 -1
- package/ogrnUL/ogrnUL.d.ts +1 -1
- package/onlyNumber/constants.d.ts +1 -1
- package/optional/optional.d.ts +1 -1
- package/optional/optionalAsync/optionalAsync.d.ts +1 -1
- package/or/or.d.ts +1 -1
- package/package.json +1 -1
- package/partial/partial.d.ts +1 -1
- package/passportCode/constants.d.ts +1 -1
- package/passportCode/passportCode.d.ts +1 -1
- package/passportCode/passportCode.js +1 -1
- package/passportNumber/constants.d.ts +1 -1
- package/passportNumber/passportNumber.d.ts +1 -1
- package/passportSeries/constants.d.ts +1 -1
- package/passportSeries/passportSeries.d.ts +1 -1
- package/passportSeries/passportSeries.js +1 -1
- package/pattern/constants.d.ts +1 -1
- package/personName/constants.d.ts +1 -1
- package/personName/personName.d.ts +1 -1
- package/personPatronymic/constants.d.ts +1 -1
- package/personPatronymic/personPatronymic.d.ts +1 -1
- package/personSurname/constants.d.ts +1 -1
- package/personSurname/personSurname.d.ts +1 -1
- package/positiveNumber/constants.d.ts +1 -1
- package/snils/constants.d.ts +1 -1
- package/snils/snils.d.ts +1 -1
- package/string/constants.d.ts +1 -1
- package/string/string.d.ts +1 -1
- package/string/stringAsync/stringAsync.d.ts +1 -1
- package/textField/constants.d.ts +1 -1
- package/toPlainError/toPlainError.d.ts +1 -1
- package/toPrettyError/toPrettyError.d.ts +2 -2
- package/transform/transform.d.ts +1 -1
- package/transform/transform.js +1 -1
- package/when/when.d.ts +1 -1
package/README.md
CHANGED
@@ -554,7 +554,7 @@ validate('156-573-259 92')
|
|
554
554
|
|
555
555
|
### textField
|
556
556
|
|
557
|
-
|
557
|
+
Правило реализует [дефолтные ограничения](https://track.astral.ru/soft/wiki/pages/viewpage.action?pageId=3813152849#id-%D0%A2%D1%80%D0%B5%D0%B1%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D1%8F%D0%BD%D0%B0%D1%80%D0%B5%D0%B0%D0%BB%D0%B8%D0%B7%D0%B0%D1%86%D0%B8%D1%8E-%D0%A2%D1%80%D0%B5%D0%B1%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B514.%D0%9F%D1%80%D0%BE%D0%B8%D0%B7%D0%B2%D0%BE%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5%D1%82%D0%B5%D0%BA%D1%81%D1%82%D0%BE%D0%B2%D1%8B%D0%B5%D0%BF%D0%BE%D0%BB%D1%8F) для произвольных текстовых полей форм Астрал-Софт.
|
558
558
|
|
559
559
|
```ts
|
560
560
|
import { string, textField } from '@astral/validations';
|
package/any/any.d.ts
CHANGED
package/array/array.d.ts
CHANGED
package/array/array.js
CHANGED
package/array/constants.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
import { ErrorInfo } from '../core';
|
1
|
+
import { type ErrorInfo } from '../core';
|
2
2
|
export declare const ARRAY_TYPE_ERROR_INFO: ErrorInfo;
|
package/arrayItem/arrayItem.d.ts
CHANGED
package/boolean/boolean.d.ts
CHANGED
package/boolean/constants.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
import { ErrorInfo } from '../core';
|
1
|
+
import { type ErrorInfo } from '../core';
|
2
2
|
export declare const BOOLEAN_TYPE_ERROR_INFO: ErrorInfo;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { ErrorCode } from '../core';
|
1
|
+
import { type ErrorCode } from '../core';
|
2
2
|
export declare const CONTAINS_DIFFERENT_CASES_ERROR_CODE: ErrorCode;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { ErrorCode } from '../core';
|
1
|
+
import { type ErrorCode } from '../core';
|
2
2
|
export declare const CONTAINS_NUMBERS_ERROR_CODE: ErrorCode;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { ErrorCode } from '../core';
|
1
|
+
import { type ErrorCode } from '../core';
|
2
2
|
export declare const CONTAINS_PUNCTUATION_MARKS_ERROR_CODE: ErrorCode;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { IndependentValidationRule, ValidationRule } from '../rule';
|
1
|
+
import { type IndependentValidationRule, type ValidationRule } from '../rule';
|
2
2
|
/**
|
3
3
|
* @description Объединяет переданные правила в цепочку правил, останавливает выполнение цепочки, если появилась ошибка. Выполняет правила слева направо
|
4
4
|
* @example compose(min(), max());
|
package/core/compose/compose.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { AsyncIndependentValidationRule, AsyncValidationRule, IndependentValidationRule, ValidationRule } from '../rule';
|
1
|
+
import { type AsyncIndependentValidationRule, type AsyncValidationRule, type IndependentValidationRule, type ValidationRule } from '../rule';
|
2
2
|
/**
|
3
3
|
* Объединяет переданные асинхронные правила в цепочку правил, останавливает выполнение цепочки, если появилась ошибка. Выполняет правила слева направо
|
4
4
|
* @example composeAsync(stringAsync(), max());
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { DeepPartial } from 'utility-types';
|
2
|
-
import { ValidationContext } from '../types';
|
3
|
-
import { ValidationTypes } from '../../types';
|
1
|
+
import { type DeepPartial } from 'utility-types';
|
2
|
+
import { type ValidationContext } from '../types';
|
3
|
+
import { type ValidationTypes } from '../../types';
|
4
4
|
type Params<TLastSchemaValues extends Record<string, unknown>> = {
|
5
5
|
/**
|
6
6
|
* Value последнего валидируемого объекта
|
package/core/context/types.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { DeepPartial, DeepReadonly } from 'utility-types';
|
2
|
-
import { createSimpleError } from '../errors';
|
1
|
+
import { type DeepPartial, type DeepReadonly } from 'utility-types';
|
2
|
+
import { type createSimpleError } from '../errors';
|
3
3
|
/**
|
4
4
|
* @description Контекст, который доступен в каждом правиле
|
5
5
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { ValidationResult } from '../../types';
|
2
|
-
import { ValidationErrorData, ValidationSimpleError } from '../SimpleError';
|
1
|
+
import { type ValidationResult } from '../../types';
|
2
|
+
import { type ValidationErrorData, ValidationSimpleError } from '../SimpleError';
|
3
3
|
/**
|
4
4
|
* @description Доп. поля для ошибок элементов массива
|
5
5
|
*/
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ValidationArrayError, ValidationArrayErrorCause } from '../ArrayError';
|
1
|
+
import { ValidationArrayError, type ValidationArrayErrorCause } from '../ArrayError';
|
2
2
|
/**
|
3
3
|
* @description Создает array ошибок. Ошибка предназначена для результата валидации массива
|
4
4
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { ValidationErrorData, ValidationSimpleError } from '../SimpleError';
|
2
|
-
import { ValidationResult } from '../../types';
|
1
|
+
import { type ValidationErrorData, ValidationSimpleError } from '../SimpleError';
|
2
|
+
import { type ValidationResult } from '../../types';
|
3
3
|
/**
|
4
4
|
* @description Map, которое содержит результат валидации свойств
|
5
5
|
*/
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ValidationErrorMap, ValidationObjectErrorCause } from '../ErrorMap';
|
1
|
+
import { ValidationErrorMap, type ValidationObjectErrorCause } from '../ErrorMap';
|
2
2
|
/**
|
3
3
|
* @description Создает map ошибок валидаций. Ошибка предназначена для генерации результата валидации объекта
|
4
4
|
*/
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { ErrorInfo } from './types';
|
1
|
+
import { type ErrorInfo } from './types';
|
2
2
|
export declare const REJECT_PROMISE_ERROR_INFO: ErrorInfo;
|
package/core/errors/types.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
import { ValidationErrorMap } from './ErrorMap';
|
2
|
-
import { ValidationSimpleError } from './SimpleError';
|
3
|
-
import { ValidationArrayError } from './ArrayError';
|
1
|
+
import { type ValidationErrorMap } from './ErrorMap';
|
2
|
+
import { type ValidationSimpleError } from './SimpleError';
|
3
|
+
import { type ValidationArrayError } from './ArrayError';
|
4
4
|
/**
|
5
5
|
* @description Уникальный код ошибки валидации
|
6
6
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { ValidationResult } from '../../types';
|
2
|
-
import { ValidationContext } from '../../context';
|
1
|
+
import { type ValidationResult } from '../../types';
|
2
|
+
import { type ValidationContext } from '../../context';
|
3
3
|
export type GuardDefOptions<AddDefOptions extends Record<string, unknown>> = Partial<AddDefOptions> & {
|
4
4
|
/**
|
5
5
|
* @description Переопределяет дефолтное сообщения ошибки для required
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { AsyncValidationRule, ValidationRule } from '../types';
|
2
|
-
import { ValidationResult } from '../../types';
|
3
|
-
import { ValidationContext } from '../../context';
|
1
|
+
import { type AsyncValidationRule, type ValidationRule } from '../types';
|
2
|
+
import { type ValidationResult } from '../../types';
|
3
|
+
import { type ValidationContext } from '../../context';
|
4
4
|
/**
|
5
5
|
* Позволяет рекурсивно вызывать асинхронные правила. Rule может возвращать другой rule
|
6
6
|
* Если один из rule выбросит exception, то функция его обработает и вернет дефолтную ошибку
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { ValidationRule } from '../types';
|
2
|
-
import { ValidationResult } from '../../types';
|
3
|
-
import { ValidationContext } from '../../context';
|
1
|
+
import { type ValidationRule } from '../types';
|
2
|
+
import { type ValidationResult } from '../../types';
|
3
|
+
import { type ValidationContext } from '../../context';
|
4
4
|
/**
|
5
5
|
* Позволяет рекурсивно вызывать правила. Rule может возвращать другой rule
|
6
6
|
*/
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { ValidationResult, ValidationTypes } from '../../types';
|
2
|
-
import { ValidationContext } from '../../context';
|
3
|
-
import { IndependentValidationRule } from '../types';
|
1
|
+
import { type ValidationResult, type ValidationTypes } from '../../types';
|
2
|
+
import { type ValidationContext } from '../../context';
|
3
|
+
import { type IndependentValidationRule } from '../types';
|
4
4
|
/**
|
5
5
|
* @description Единые параметры для всех правил
|
6
6
|
*/
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { ErrorInfo } from '../../errors';
|
1
|
+
import { type ErrorInfo } from '../../errors';
|
2
2
|
export declare const REQUIRED_ERROR_INFO: ErrorInfo;
|
package/core/rule/types.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { ValidationContext } from '../context';
|
2
|
-
import { ValidationResult } from '../types';
|
1
|
+
import { type ValidationContext } from '../context';
|
2
|
+
import { type ValidationResult } from '../types';
|
3
3
|
/**
|
4
4
|
* @description Самостоятельное правило для валидации. Может использоваться вне guard'ов
|
5
5
|
*/
|
package/core/types.d.ts
CHANGED
package/date/constants.d.ts
CHANGED
package/date/date.d.ts
CHANGED
package/email/constants.d.ts
CHANGED
package/guid/constants.d.ts
CHANGED
package/innFL/constants.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
import { ErrorInfo } from '../core';
|
1
|
+
import { type ErrorInfo } from '../core';
|
2
2
|
export declare const INN_FL_ERROR_INFO: ErrorInfo;
|
package/innFL/innFL.d.ts
CHANGED
package/innIP/constants.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
import { ErrorInfo } from '../core';
|
1
|
+
import { type ErrorInfo } from '../core';
|
2
2
|
export declare const INN_IP_ERROR_INFO: ErrorInfo;
|
package/innIP/innIP.d.ts
CHANGED
package/innUL/constants.d.ts
CHANGED
package/innUL/innUL.d.ts
CHANGED
package/integer/constants.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
import { ErrorInfo } from '../core';
|
1
|
+
import { type ErrorInfo } from '../core';
|
2
2
|
export declare const INTEGER_ERROR_INFO: ErrorInfo;
|
package/kpp/constants.d.ts
CHANGED
package/kpp/kpp.d.ts
CHANGED
package/length/constants.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
import { ErrorCode } from '../core';
|
1
|
+
import { type ErrorCode } from '../core';
|
2
2
|
export declare const STRING_LENGTH_ERROR_CODE: ErrorCode;
|
package/max/constants.d.ts
CHANGED
package/max/max.d.ts
CHANGED
package/min/constants.d.ts
CHANGED
package/min/min.d.ts
CHANGED
package/number/constants.d.ts
CHANGED
package/number/number.d.ts
CHANGED
package/object/constants.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
import { ErrorInfo } from '../core';
|
1
|
+
import { type ErrorInfo } from '../core';
|
2
2
|
export declare const OBJECT_TYPE_ERROR_INFO: ErrorInfo;
|
package/object/object.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Guard, ValidationContext, ValidationRule } from '../core';
|
1
|
+
import { type Guard, type ValidationContext, type ValidationRule } from '../core';
|
2
2
|
/**
|
3
3
|
* @description Специальный итерфейс Guard для object. В данном интерфейсе ctx required
|
4
4
|
* Переопределение необходимо для того, чтобы ts показывал, что ctx required в кастомных правилах
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { AsyncGuard, AsyncValidationRule, Guard, ValidationContext, ValidationRule } from '../../core';
|
1
|
+
import { type AsyncGuard, type AsyncValidationRule, type Guard, type ValidationContext, type ValidationRule } from '../../core';
|
2
2
|
/**
|
3
3
|
* @description Специальный итерфейс Guard для object. В данном интерфейсе ctx required
|
4
4
|
* Переопределение необходимо для того, чтобы ts показывал, что ctx required в кастомных правилах
|
package/ogrnIP/constants.d.ts
CHANGED
package/ogrnIP/ogrnIP.d.ts
CHANGED
package/ogrnUL/constants.d.ts
CHANGED
package/ogrnUL/ogrnUL.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
import { ErrorCode } from '../core';
|
1
|
+
import { type ErrorCode } from '../core';
|
2
2
|
export declare const ONLY_NUMBER_ERROR_CODE: ErrorCode;
|
package/optional/optional.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { AsyncIndependentValidationRule, AsyncValidationRule, ValidationRule } from '../../core';
|
1
|
+
import { type AsyncIndependentValidationRule, type AsyncValidationRule, type ValidationRule } from '../../core';
|
2
2
|
/**
|
3
3
|
* @description Выключает проверку на required в guard. Предназначен для асинхронных правил.
|
4
4
|
* @example object({ name: optionalAsync(stringAsync(min(22))) })
|
package/or/or.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ValidationResult, ValidationRule } from '../core';
|
1
|
+
import { type ValidationResult, type ValidationRule } from '../core';
|
2
2
|
/**
|
3
3
|
* @description Выполняет переданные правила аналогично оператору ||. Если одно из правил не завершилось ошибкой, то or вернет undefined
|
4
4
|
* Если все переданные правила завершились с ошибкой, то вернется ошибка из последнего правила
|
package/package.json
CHANGED
package/partial/partial.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ErrorInfo } from '../core';
|
1
|
+
import { type ErrorInfo } from '../core';
|
2
2
|
export declare const PASSPORT_CODE_ERROR_INFO: ErrorInfo;
|
3
3
|
export declare const PASSPORT_CODE_LENGTH_ERROR_INFO: ErrorInfo;
|
4
4
|
export declare const PASSPORT_CODE_ONLY_DIGITS_ERROR_INFO: ErrorInfo;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { createRule, isNoDoubleZeroStart } from '../core';
|
1
|
+
import { createRule, isNoDoubleZeroStart, } from '../core';
|
2
2
|
import { onlyNumber } from '../onlyNumber';
|
3
3
|
import { PASSPORT_CODE_ERROR_INFO, PASSPORT_CODE_LENGTH_ERROR_INFO, PASSPORT_CODE_ONLY_DIGITS_ERROR_INFO, } from './constants';
|
4
4
|
/**
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ErrorInfo } from '../core';
|
1
|
+
import { type ErrorInfo } from '../core';
|
2
2
|
export declare const PASSPORT_NUMBER_ERROR_INFO: ErrorInfo;
|
3
3
|
export declare const PASSPORT_NUMBER_LENGTH_ERROR_INFO: ErrorInfo;
|
4
4
|
export declare const PASSPORT_NUMBER_ONLY_DIGITS_ERROR_INFO: ErrorInfo;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ErrorInfo } from '../core';
|
1
|
+
import { type ErrorInfo } from '../core';
|
2
2
|
export declare const PASSPORT_SERIES_ERROR_INFO: ErrorInfo;
|
3
3
|
export declare const PASSPORT_SERIES_ERROR_LENGTH_INFO: ErrorInfo;
|
4
4
|
export declare const PASSPORT_SERIES_ONLY_DIGITS_ERROR_INFO: ErrorInfo;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { createRule, isNoDoubleZeroStart } from '../core';
|
1
|
+
import { createRule, isNoDoubleZeroStart, } from '../core';
|
2
2
|
import { onlyNumber } from '../onlyNumber';
|
3
3
|
import { PASSPORT_SERIES_ERROR_INFO, PASSPORT_SERIES_ERROR_LENGTH_INFO, PASSPORT_SERIES_ONLY_DIGITS_ERROR_INFO, } from './constants';
|
4
4
|
/**
|
package/pattern/constants.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
import { ErrorCode } from '../core';
|
1
|
+
import { type ErrorCode } from '../core';
|
2
2
|
export declare const PATTERN_ERROR_CODE: ErrorCode;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { ErrorInfo } from '../core';
|
1
|
+
import { type ErrorInfo } from '../core';
|
2
2
|
export declare const PERSON_NAME_ERROR_INFO: ErrorInfo;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { ErrorInfo } from '../core';
|
1
|
+
import { type ErrorInfo } from '../core';
|
2
2
|
export declare const PERSON_PATRONYMIC_ERROR_INFO: ErrorInfo;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { ErrorInfo } from '../core';
|
1
|
+
import { type ErrorInfo } from '../core';
|
2
2
|
export declare const PERSON_SURNAME_ERROR_INFO: ErrorInfo;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { ErrorInfo } from '../core';
|
1
|
+
import { type ErrorInfo } from '../core';
|
2
2
|
export declare const POSITIVE_NUMBER_ERROR_INFO: ErrorInfo;
|
package/snils/constants.d.ts
CHANGED
package/snils/snils.d.ts
CHANGED
package/string/constants.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
import { ErrorInfo } from '../core';
|
1
|
+
import { type ErrorInfo } from '../core';
|
2
2
|
export declare const STRING_TYPE_ERROR_INFO: ErrorInfo;
|
package/string/string.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
import { ValidationRule } from '../core';
|
1
|
+
import { type ValidationRule } from '../core';
|
2
2
|
export declare const string: <TLastSchemaValues extends Record<string, unknown>>(...rules: ValidationRule<string, TLastSchemaValues>[]) => import("../core").Guard<TLastSchemaValues, {}>;
|
package/textField/constants.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ValidationResult, ValidationSimpleError } from '../core';
|
1
|
+
import { type ValidationResult, type ValidationSimpleError } from '../core';
|
2
2
|
type PlainArrayResult<TPlainSimpleError> = Array<TPlainSimpleError | TPlainSimpleError[] | PlainErrorMap<TPlainSimpleError> | PlainArrayResult<TPlainSimpleError> | undefined>;
|
3
3
|
type PlainErrorMap<TPlainSimpleError> = {
|
4
4
|
[key: string]: TPlainSimpleError | PlainArrayResult<TPlainSimpleError> | PlainErrorMap<TPlainSimpleError>;
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { ValidationResult } from '../core';
|
2
|
-
import { PlainValidationResult } from '../toPlainError';
|
1
|
+
import { type ValidationResult } from '../core';
|
2
|
+
import { type PlainValidationResult } from '../toPlainError';
|
3
3
|
/**
|
4
4
|
* @description Преобразует ошибку валидации в формат для вывода (например, в консоль)
|
5
5
|
* @param validationResult
|
package/transform/transform.d.ts
CHANGED
package/transform/transform.js
CHANGED
package/when/when.d.ts
CHANGED