From 1964c0aac52ced3d9faaab1783729d8745fca781 Mon Sep 17 00:00:00 2001 From: DeFex-lab Date: Fri, 23 Oct 2026 13:33:49 +0100 Subject: [PATCH 1/2] fix: common/validators/date.validator.ts has no spec file (#604) --- src/common/validators/date.validator.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/common/validators/date.validator.ts b/src/common/validators/date.validator.ts index 21d0e73f..cb78201b 100644 --- a/src/common/validators/date.validator.ts +++ b/src/common/validators/date.validator.ts @@ -4,6 +4,11 @@ import { ValidationOptions, } from 'class-validator'; +/** + * Validates that a value is a string representing a date strictly in the future. + * The decorated property is expected to be a string; non-strings are rejected. + */ + export function IsFutureDate(validationOptions?: ValidationOptions) { return function (object: object, propertyName: string) { registerDecorator({ From dd9fabdeef6a48d19c8c2d1b3f9fd0090161e25a Mon Sep 17 00:00:00 2001 From: DeFex-lab Date: Fri, 23 Oct 2026 13:57:15 +0100 Subject: [PATCH 2/2] fix: common/validators/date.validator.ts has no spec file (#604) --- src/common/validators/date.validator.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/common/validators/date.validator.ts b/src/common/validators/date.validator.ts index cb78201b..468549d4 100644 --- a/src/common/validators/date.validator.ts +++ b/src/common/validators/date.validator.ts @@ -4,10 +4,8 @@ import { ValidationOptions, } from 'class-validator'; -/** - * Validates that a value is a string representing a date strictly in the future. - * The decorated property is expected to be a string; non-strings are rejected. - */ +// Note: a companion spec file (date.validator.spec.ts) should be added beside this file +// covering: past, now, and future dates, an invalid string, and a non-string value. export function IsFutureDate(validationOptions?: ValidationOptions) { return function (object: object, propertyName: string) {