1.修改电话号码格式为60前缀,马来西亚格式
2.优化渠道可以查看分红方式,可以查看游玩详情
This commit is contained in:
@@ -2,6 +2,11 @@ import type { RuleType } from 'async-validator'
|
||||
import type { FormItemRule } from 'element-plus'
|
||||
import { i18n } from '../lang'
|
||||
|
||||
/**
|
||||
* 马来西亚手机号(60 国际前缀,不含 +)
|
||||
*/
|
||||
export const malaysiaMobilePattern = /^60(1[0-9])\d{7,9}$/
|
||||
|
||||
/**
|
||||
* 手机号码验证
|
||||
*/
|
||||
@@ -10,7 +15,7 @@ export function validatorMobile(rule: any, mobile: string | number, callback: Fu
|
||||
if (!mobile) {
|
||||
return callback()
|
||||
}
|
||||
if (!/^(1[3-9])\d{9}$/.test(mobile.toString())) {
|
||||
if (!malaysiaMobilePattern.test(mobile.toString())) {
|
||||
return callback(new Error(i18n.global.t('validate.Please enter the correct mobile number')))
|
||||
}
|
||||
return callback()
|
||||
|
||||
Reference in New Issue
Block a user