diff --git a/src/decorator/common/IsLatitude.ts b/src/decorator/common/IsLatitude.ts index 1be12e130e..df487afd6f 100644 --- a/src/decorator/common/IsLatitude.ts +++ b/src/decorator/common/IsLatitude.ts @@ -7,7 +7,7 @@ export const IS_LATITUDE = 'isLatitude'; /** * Checks if a given value is a latitude. */ -export function isLatitude(value: string): boolean { +export function isLatitude(value: number | string): boolean { return (typeof value === 'number' || typeof value === 'string') && isLatLong(`${value},0`); } diff --git a/src/decorator/common/IsLongitude.ts b/src/decorator/common/IsLongitude.ts index 013f5387af..ae18f67e04 100644 --- a/src/decorator/common/IsLongitude.ts +++ b/src/decorator/common/IsLongitude.ts @@ -7,7 +7,7 @@ export const IS_LONGITUDE = 'isLongitude'; /** * Checks if a given value is a longitude. */ -export function isLongitude(value: string): boolean { +export function isLongitude(value: number | string): boolean { return (typeof value === 'number' || typeof value === 'string') && isLatLong(`0,${value}`); }