@decaf-ts/decorator-validation 1.4.20 → 1.4.21
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/dist/decorator-validation.bundle.min.js +1 -1
- package/dist/esm/decorator-validation.bundle.min.esm.js +1 -1
- package/lib/esm/index.d.ts +1 -1
- package/lib/esm/index.js +1 -3
- package/lib/esm/model/Model.js +0 -2
- package/lib/esm/model/ModelErrorDefinition.js +0 -2
- package/lib/esm/model/Registry.js +0 -2
- package/lib/esm/model/constants.js +0 -2
- package/lib/esm/model/construction.js +0 -2
- package/lib/esm/model/decorators.js +0 -2
- package/lib/esm/model/index.js +0 -2
- package/lib/esm/model/types.js +0 -2
- package/lib/esm/model/utils.js +0 -2
- package/lib/esm/model/validation.js +0 -2
- package/lib/esm/utils/constants.js +0 -2
- package/lib/esm/utils/dates.js +0 -2
- package/lib/esm/utils/decorators.js +0 -2
- package/lib/esm/utils/hashing.js +0 -2
- package/lib/esm/utils/index.js +0 -2
- package/lib/esm/utils/registry.js +0 -2
- package/lib/esm/utils/serialization.js +0 -2
- package/lib/esm/utils/strings.js +0 -2
- package/lib/esm/validation/Validation.js +0 -2
- package/lib/esm/validation/Validators/DateValidator.js +0 -2
- package/lib/esm/validation/Validators/EmailValidator.js +0 -2
- package/lib/esm/validation/Validators/ListValidator.js +0 -2
- package/lib/esm/validation/Validators/MaxLengthValidator.js +0 -2
- package/lib/esm/validation/Validators/MaxValidator.js +0 -2
- package/lib/esm/validation/Validators/MinLengthValidator.js +0 -2
- package/lib/esm/validation/Validators/MinValidator.js +0 -2
- package/lib/esm/validation/Validators/PasswordValidator.js +0 -2
- package/lib/esm/validation/Validators/PatternValidator.js +0 -2
- package/lib/esm/validation/Validators/RequiredValidator.js +0 -2
- package/lib/esm/validation/Validators/StepValidator.js +0 -2
- package/lib/esm/validation/Validators/TypeValidator.js +0 -2
- package/lib/esm/validation/Validators/URLValidator.js +0 -2
- package/lib/esm/validation/Validators/Validator.js +0 -2
- package/lib/esm/validation/Validators/ValidatorRegistry.js +0 -2
- package/lib/esm/validation/Validators/constants.js +0 -2
- package/lib/esm/validation/Validators/decorators.js +0 -2
- package/lib/esm/validation/Validators/index.js +0 -2
- package/lib/esm/validation/Validators/types.js +1 -0
- package/lib/esm/validation/decorators.js +0 -2
- package/lib/esm/validation/index.js +0 -2
- package/lib/esm/validation/types.js +0 -2
- package/lib/index.cjs +1 -1
- package/lib/index.d.ts +1 -1
- package/package.json +1 -1
- package/lib/validation/Validators/index.d.ts +0 -52
- package/lib/validation/Validators/types.d.ts +0 -51
package/package.json
CHANGED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { DateValidator } from "./DateValidator";
|
|
2
|
-
import { TypeValidator } from "./TypeValidator";
|
|
3
|
-
import { PasswordValidator } from "./PasswordValidator";
|
|
4
|
-
import { StepValidator } from "./StepValidator";
|
|
5
|
-
import { URLValidator } from "./URLValidator";
|
|
6
|
-
import { PatternValidator } from "./PatternValidator";
|
|
7
|
-
import { MinValidator } from "./MinValidator";
|
|
8
|
-
import { MinLengthValidator } from "./MinLengthValidator";
|
|
9
|
-
import { MaxValidator } from "./MaxValidator";
|
|
10
|
-
import { MaxLengthValidator } from "./MaxLengthValidator";
|
|
11
|
-
import { RequiredValidator } from "./RequiredValidator";
|
|
12
|
-
import { EmailValidator } from "./EmailValidator";
|
|
13
|
-
import { ListValidator } from "./ListValidator";
|
|
14
|
-
export * from "./constants";
|
|
15
|
-
export * from "./DateValidator";
|
|
16
|
-
export * from "./decorators";
|
|
17
|
-
export * from "./EmailValidator";
|
|
18
|
-
export * from "./ListValidator";
|
|
19
|
-
export * from "./MaxLengthValidator";
|
|
20
|
-
export * from "./MaxValidator";
|
|
21
|
-
export * from "./MinLengthValidator";
|
|
22
|
-
export * from "./MinValidator";
|
|
23
|
-
export * from "./PasswordValidator";
|
|
24
|
-
export * from "./PatternValidator";
|
|
25
|
-
export * from "./RequiredValidator";
|
|
26
|
-
export * from "./StepValidator";
|
|
27
|
-
export * from "./types";
|
|
28
|
-
export * from "./TypeValidator";
|
|
29
|
-
export * from "./URLValidator";
|
|
30
|
-
export * from "./Validator";
|
|
31
|
-
export * from "./ValidatorRegistry";
|
|
32
|
-
/**
|
|
33
|
-
* @summary constant holding all {@link Validator}s
|
|
34
|
-
* @constant Validators
|
|
35
|
-
* @memberOf module:decorator-validation.Validation.Validators
|
|
36
|
-
* @category Validation
|
|
37
|
-
*/
|
|
38
|
-
export declare const Validators: {
|
|
39
|
-
DateValidator: typeof DateValidator;
|
|
40
|
-
EmailValidator: typeof EmailValidator;
|
|
41
|
-
ListValidator: typeof ListValidator;
|
|
42
|
-
MaxLengthValidator: typeof MaxLengthValidator;
|
|
43
|
-
MaxValidator: typeof MaxValidator;
|
|
44
|
-
MinLengthValidator: typeof MinLengthValidator;
|
|
45
|
-
MinValidator: typeof MinValidator;
|
|
46
|
-
PasswordValidator: typeof PasswordValidator;
|
|
47
|
-
PatternValidator: typeof PatternValidator;
|
|
48
|
-
RequiredValidator: typeof RequiredValidator;
|
|
49
|
-
StepValidator: typeof StepValidator;
|
|
50
|
-
TypeValidator: typeof TypeValidator;
|
|
51
|
-
URLValidator: typeof URLValidator;
|
|
52
|
-
};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { Validator } from "./Validator";
|
|
2
|
-
import { IRegistry } from "../../utils/registry";
|
|
3
|
-
import { Constructor } from "../../model/types";
|
|
4
|
-
/**
|
|
5
|
-
* @summary Util type for {@link Validator} configuration
|
|
6
|
-
* @memberOf module:decorator-validation.Validation
|
|
7
|
-
* @category Validation
|
|
8
|
-
*/
|
|
9
|
-
export type ValidatorDefinition = {
|
|
10
|
-
validator: Constructor<Validator>;
|
|
11
|
-
validationKey: string;
|
|
12
|
-
save: boolean;
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* @summary Base API for a {@link Validator} registry
|
|
16
|
-
*
|
|
17
|
-
* @interface ValidatorRegistry
|
|
18
|
-
* @extends IRegistry
|
|
19
|
-
*
|
|
20
|
-
* @category Validation
|
|
21
|
-
*/
|
|
22
|
-
export interface IValidatorRegistry<T extends Validator> extends IRegistry<T> {
|
|
23
|
-
/**
|
|
24
|
-
* @summary retrieves the custom keys
|
|
25
|
-
* @method
|
|
26
|
-
*/
|
|
27
|
-
getCustomKeys(): Record<string, string>;
|
|
28
|
-
/**
|
|
29
|
-
* @summary Retrieves the Registered validator keys
|
|
30
|
-
* @return {string[]} the registered validators keys
|
|
31
|
-
* @method
|
|
32
|
-
*/
|
|
33
|
-
getKeys(): string[];
|
|
34
|
-
/**
|
|
35
|
-
* @summary Registers the provided validators onto the registry
|
|
36
|
-
*
|
|
37
|
-
* @typedef T extends Validator
|
|
38
|
-
* @param {T[] | ValidatorDefinition[]} validator
|
|
39
|
-
* @method
|
|
40
|
-
*/
|
|
41
|
-
register<T extends Validator>(...validator: (T | ValidatorDefinition)[]): void;
|
|
42
|
-
/**
|
|
43
|
-
* @summary Retrieves the Validator constructor if registered
|
|
44
|
-
*
|
|
45
|
-
* @typedef T extends Validator
|
|
46
|
-
* @param {string} key one of the {@link ValidationKeys}
|
|
47
|
-
* @return {Validator | undefined} the registered Validator or undefined if there is nono matching the provided key
|
|
48
|
-
* @method
|
|
49
|
-
*/
|
|
50
|
-
get<T extends Validator>(key: string): T | undefined;
|
|
51
|
-
}
|