Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Verify

Hierarchy

  • Verify

Index

Methods

verifyCode

  • verifyCode(code: string): boolean
  • 判断是否是6位纯数字验证码

    author

    Jarvan

    if (utils.verifyCode(code)) {
       // do sth.
    }

    Parameters

    • code: string

      传入需要验证的验证码

    Returns boolean

    true | false

verifyEmail

  • verifyEmail(email: string): boolean
  • 判断是否是合法邮箱格式

    author

    Jarvan

    if (utils.verifyEmail(email)) {
       // do sth.
    }

    Parameters

    • email: string

      传入需要验证的邮箱

    Returns boolean

    true | false

verifyHttp

  • verifyHttp(value: string): boolean
  • 判断是否是合法链接

    author

    Jarvan

    if (utils.verifyHttp(url)) {
       // do sth.
    }

    Parameters

    • value: string

      传入需要验证的url

    Returns boolean

    true | false

verifyMobile

  • verifyMobile(mobile: string): boolean
  • 判断是否是合法手机号

    author

    Jarvan

    if (utils.verifyMobile(mobile)) {
       // do sth.
    }

    Parameters

    • mobile: string

      传入需要验证的手机号

    Returns boolean

    true | false

Generated using TypeDoc