Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "IsMobilePhone"

Index

References

Type aliases

Variables

Functions

References

MobilePhoneLocale

Re-exports MobilePhoneLocale

Type aliases

IsMobilePhoneOptions

IsMobilePhoneOptions: vtsIsMobilePhoneOptions

Rexport the options

Variables

Const IsMobilePhoneLocales

IsMobilePhoneLocales: string[] = vtsIsMobilePhoneLocales

Functions

isMobilePhone

  • isMobilePhone(value: string, locale: string, options?: IsMobilePhoneOptions): boolean
  • Checks if the string is a mobile phone number (locale is one of ['zh-CN', 'zh-TW', 'en-ZA', 'en-AU', 'en-HK', 'pt-PT', 'fr-FR', 'el-GR', 'en-GB', 'en-US', 'en-ZM', 'ru-RU', 'nb-NO', 'nn-NO', 'vi-VN', 'en-NZ']). If given value is not a string, then it returns false.

    Parameters

    • value: string

      The value being checked.

    • locale: string
    • Optional options: IsMobilePhoneOptions

      The optional configuration MobilePhoneLocale.

    Returns boolean

    True if the string is a mobile phone number, false otherwise.

Generated using TypeDoc