export function checkPhone( phone: string ):Boolean {
if ( phone && phone.length == 11 ) {
let phoneRegexp = /^1[356789]\d{9}$/gi
let isMatch = phoneRegexp.test( phone )
return isMatch
} else {
return false
}
}
export function ISphone ( val: string ): boolean {
let reg = /^1[356789]\d{9}$/
return reg.test( val )
}
export function ISId ( val: string ) :boolean {
if ( val && val.length == 18 ) {
let reg = /(\d{18})|(\d{17}X$)/gi
return reg.test( val )
} else {
return false
}
}
弱密码验证正则
pattern: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[^]{8,16}$/,
message: "密码至少包含大写字母,小写字母,数字,且不少于8位",