From bf9b9e43920748bdba7aafc437e5e7e3b6f903ef Mon Sep 17 00:00:00 2001 From: Cristian Sori <150058074+csori99@users.noreply.github.com> Date: Mon, 24 Mar 2025 14:35:44 -0400 Subject: [PATCH] Update IsPostalCode.ts locale should not be marked as optional, under the hood it doesnt accept undefined as a value, causing errors. --- src/decorator/string/IsPostalCode.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/decorator/string/IsPostalCode.ts b/src/decorator/string/IsPostalCode.ts index 507a462c64..5a8a84c1ff 100644 --- a/src/decorator/string/IsPostalCode.ts +++ b/src/decorator/string/IsPostalCode.ts @@ -18,7 +18,7 @@ export function isPostalCode(value: unknown, locale: 'any' | ValidatorJS.PostalC * If given value is not a string, then it returns false. */ export function IsPostalCode( - locale?: 'any' | ValidatorJS.PostalCodeLocale, + locale: 'any' | ValidatorJS.PostalCodeLocale, validationOptions?: ValidationOptions ): PropertyDecorator { return ValidateBy(