$ui/utils/regex

正则表达式模块,常用的表达式集合

Source:

Members

(inner) EMAIL

Source:

email表达式

(inner) ID

Source:

身份证号码表达式

(inner) MOBILE_PHONE

Source:

手机号码表达式

(inner) URL

Source:

url表达式

Methods

(static) isEmail(str) → {boolean}

Source:

检测字符串是否邮箱

Parameters:
Name Type Description
str string

需要检测的字符串

Returns:
Type
boolean

(static) isId(str) → {boolean}

Source:

检测字符串是否身份证号码

Parameters:
Name Type Description
str string

需要检测的字符串

Returns:
Type
boolean

(static) isMobilePhone(str) → {boolean}

Source:

检测字符串是否手机号码

Parameters:
Name Type Description
str string

需要检测的字符串

Returns:
Type
boolean

(static) isUrl(str) → {boolean}

Source:

检测字符串是否url

Parameters:
Name Type Description
str string

需要检测的字符串

Returns:
Type
boolean