Skip to content

Commit bf9b9e4

Browse files
authored
Update IsPostalCode.ts
locale should not be marked as optional, under the hood it doesnt accept undefined as a value, causing errors.
1 parent 0ea279b commit bf9b9e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/decorator/string/IsPostalCode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export function isPostalCode(value: unknown, locale: 'any' | ValidatorJS.PostalC
1818
* If given value is not a string, then it returns false.
1919
*/
2020
export function IsPostalCode(
21-
locale?: 'any' | ValidatorJS.PostalCodeLocale,
21+
locale: 'any' | ValidatorJS.PostalCodeLocale,
2222
validationOptions?: ValidationOptions
2323
): PropertyDecorator {
2424
return ValidateBy(

0 commit comments

Comments
 (0)