From 4eba89c59eeb73ed556393d64ce6439b5ff04e30 Mon Sep 17 00:00:00 2001 From: daniel ramezani Date: Wed, 19 Jun 2024 05:11:14 +0330 Subject: [PATCH 1/2] change isMobilePhone to get the array --- src/decorator/string/IsMobilePhone.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/decorator/string/IsMobilePhone.ts b/src/decorator/string/IsMobilePhone.ts index 34859b5007..24825f4be4 100644 --- a/src/decorator/string/IsMobilePhone.ts +++ b/src/decorator/string/IsMobilePhone.ts @@ -38,7 +38,7 @@ export function isMobilePhone( * If given value is not a string, then it returns false. */ export function IsMobilePhone( - locale?: ValidatorJS.MobilePhoneLocale, + locale?: ValidatorJS.MobilePhoneLocale | ValidatorJS.MobilePhoneLocale[], options?: ValidatorJS.IsMobilePhoneOptions, validationOptions?: ValidationOptions ): PropertyDecorator { From b37788a09b74f114db1de12d482757fb04691ca2 Mon Sep 17 00:00:00 2001 From: daniel ramezani Date: Wed, 19 Jun 2024 05:25:37 +0330 Subject: [PATCH 2/2] update readme.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 886712dd76..d37c965ca8 100644 --- a/README.md +++ b/README.md @@ -873,7 +873,7 @@ isBoolean(value); | `@IsLatLong()` | Checks if the string is a valid latitude-longitude coordinate in the format lat, long. | | `@IsLatitude()` | Checks if the string or number is a valid latitude coordinate. | | `@IsLongitude()` | Checks if the string or number is a valid longitude coordinate. | -| `@IsMobilePhone(locale: string)` | Checks if the string is a mobile phone number. | +| `@IsMobilePhone(locale: string | string[])` | Checks if the string is a mobile phone number. | | `@IsISO31661Alpha2()` | Checks if the string is a valid ISO 3166-1 alpha-2 officially assigned country code. | | `@IsISO31661Alpha3()` | Checks if the string is a valid ISO 3166-1 alpha-3 officially assigned country code. | | `@IsLocale()` | Checks if the string is a locale. |