修复字段校验的正则表达式错误。

master
vdpAdmin 2021-12-13 18:19:53 +08:00
parent dd158f05b1
commit 8eb136174d
1 changed files with 3 additions and 3 deletions

View File

@ -3,12 +3,12 @@ import {isEmptyStr, isNull} from "./util";
export const getRegExp = function (validatorName) {
const commonRegExp = {
number: '/^\\d+(\\.\\d+)?$/',
letter: '/^[A-Za-z]$/',
letter: '/^[A-Za-z]+$/',
letterAndNumber: '/^[A-Za-z0-9]+$/',
mobilePhone: '/^[1][3-9][0-9]{9}$/',
letterStartNumberIncluded: '/^[A-Za-z]+[A-Za-z\\d]*$/',
noChinese: '/^[^\u4e00-\u9fa5]$/',
chinese: '/^[\u4e00-\u9fa5]$/',
noChinese: '/^[^\u4e00-\u9fa5]+$/',
chinese: '/^[\u4e00-\u9fa5]+$/',
email: '/^([-_A-Za-z0-9.]+)@([_A-Za-z0-9]+\\.)+[A-Za-z0-9]{2,3}$/',
url: '/^([hH][tT]{2}[pP]:\\/\\/|[hH][tT]{2}[pP][sS]:\\/\\/)(([A-Za-z0-9-~]+)\\.)+([A-Za-z0-9-~\\/])+$/',
}