@decaf-ts/decorator-validation 1.7.14 → 1.7.16
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.cjs +64 -43
- package/dist/decorator-validation.esm.cjs +64 -43
- package/lib/esm/index.d.ts +1 -1
- package/lib/esm/index.js +1 -1
- package/lib/esm/model/validation.js +5 -4
- package/lib/esm/validation/Validators/DiffValidator.js +2 -2
- package/lib/esm/validation/Validators/EqualsValidator.js +2 -2
- package/lib/esm/validation/Validators/GreaterThanOrEqualValidator.js +2 -2
- package/lib/esm/validation/Validators/GreaterThanValidator.js +2 -2
- package/lib/esm/validation/Validators/LessThanOrEqualValidator.js +2 -2
- package/lib/esm/validation/Validators/LessThanValidator.js +2 -2
- package/lib/esm/validation/Validators/TypeValidator.js +3 -3
- package/lib/esm/validation/decorators.d.ts +25 -13
- package/lib/esm/validation/decorators.js +51 -31
- package/lib/esm/validation/types.d.ts +11 -8
- package/lib/esm/validation/types.js +1 -1
- package/lib/index.cjs +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/model/validation.cjs +5 -4
- package/lib/validation/Validators/DiffValidator.cjs +2 -2
- package/lib/validation/Validators/EqualsValidator.cjs +2 -2
- package/lib/validation/Validators/GreaterThanOrEqualValidator.cjs +2 -2
- package/lib/validation/Validators/GreaterThanValidator.cjs +2 -2
- package/lib/validation/Validators/LessThanOrEqualValidator.cjs +2 -2
- package/lib/validation/Validators/LessThanValidator.cjs +2 -2
- package/lib/validation/Validators/TypeValidator.cjs +3 -3
- package/lib/validation/decorators.cjs +51 -31
- package/lib/validation/decorators.d.ts +25 -13
- package/lib/validation/types.cjs +1 -1
- package/lib/validation/types.d.ts +11 -8
- package/package.json +1 -1
|
@@ -161,12 +161,12 @@ export interface URLValidatorOptions extends ValidatorOptions {
|
|
|
161
161
|
* @description Type validation options interface
|
|
162
162
|
* @summary Defines options for type validation, specifying allowed types
|
|
163
163
|
* @interface TypeValidatorOptions
|
|
164
|
-
* @property {(string|string[]|{ name: string })}
|
|
164
|
+
* @property {(string|string[]|{ name: string })} type - Specifies the allowed data types
|
|
165
165
|
* @memberOf module:decorator-validation
|
|
166
166
|
* @category Validation
|
|
167
167
|
*/
|
|
168
168
|
export interface TypeValidatorOptions extends ValidatorOptions {
|
|
169
|
-
|
|
169
|
+
type: string | string[] | {
|
|
170
170
|
name: string;
|
|
171
171
|
};
|
|
172
172
|
customTypes?: (string | (() => string))[];
|
|
@@ -276,21 +276,24 @@ export interface UniqueValidatorOptions extends ValidatorOptions {
|
|
|
276
276
|
export interface DateValidatorOptions extends ValidatorOptions {
|
|
277
277
|
[ValidationKeys.FORMAT]?: string;
|
|
278
278
|
}
|
|
279
|
-
export interface
|
|
279
|
+
export interface ComparisonValidatorOptions extends ValidatorOptions {
|
|
280
|
+
label?: string;
|
|
281
|
+
}
|
|
282
|
+
export interface EqualsValidatorOptions extends ComparisonValidatorOptions {
|
|
280
283
|
[ValidationKeys.EQUALS]: string;
|
|
281
284
|
}
|
|
282
|
-
export interface DiffValidatorOptions extends
|
|
285
|
+
export interface DiffValidatorOptions extends ComparisonValidatorOptions {
|
|
283
286
|
[ValidationKeys.DIFF]: string;
|
|
284
287
|
}
|
|
285
|
-
export interface LessThanValidatorOptions extends
|
|
288
|
+
export interface LessThanValidatorOptions extends ComparisonValidatorOptions {
|
|
286
289
|
[ValidationKeys.LESS_THAN]: string;
|
|
287
290
|
}
|
|
288
|
-
export interface LessThanOrEqualValidatorOptions extends
|
|
291
|
+
export interface LessThanOrEqualValidatorOptions extends ComparisonValidatorOptions {
|
|
289
292
|
[ValidationKeys.LESS_THAN_OR_EQUAL]: string;
|
|
290
293
|
}
|
|
291
|
-
export interface GreaterThanValidatorOptions extends
|
|
294
|
+
export interface GreaterThanValidatorOptions extends ComparisonValidatorOptions {
|
|
292
295
|
[ValidationKeys.GREATER_THAN]: string;
|
|
293
296
|
}
|
|
294
|
-
export interface GreaterThanOrEqualValidatorOptions extends
|
|
297
|
+
export interface GreaterThanOrEqualValidatorOptions extends ComparisonValidatorOptions {
|
|
295
298
|
[ValidationKeys.GREATER_THAN_OR_EQUAL]: string;
|
|
296
299
|
}
|