feat: 实名认证页
这个提交包含在:
父节点
a0627a137b
当前提交
bfb3fa3fcb
@ -13,4 +13,25 @@ export class ValidatorHelper {
|
||||
let regexp: RegExp = new RegExp('^1[0-9]{10}$');
|
||||
return regexp.test(phone)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否为姓名
|
||||
* @param name
|
||||
* @returns
|
||||
*/
|
||||
public static isName(name: string) {
|
||||
let regexp: RegExp = new RegExp('^[\u4e00-\u9fa50-9a-zA-Z]{1,30}$');
|
||||
return regexp.test(name)
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否为身份证号
|
||||
* @param idcardNum
|
||||
* @returns
|
||||
*/
|
||||
public static isIdcardNum(idcardNum: string) {
|
||||
let regexp: RegExp = new RegExp('(^\\d{18}$)|(^\\d{17}(\\d|X|x)$)');
|
||||
return regexp.test(idcardNum)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
正在加载...
在新工单中引用
屏蔽一个用户