Commit ea3e4e31 by zhanghaozhe

手机号验证规则

parent 61799b2c
...@@ -148,7 +148,7 @@ const FormikConfig = { ...@@ -148,7 +148,7 @@ const FormikConfig = {
validateOnChange: true, validateOnChange: true,
validate: (values) => { validate: (values) => {
let errors = {} let errors = {}
if (!validateTel(values.tel)) { if (!/\d/.test(values.tel)) {
errors.tel = '请填写正确格式的手机号' errors.tel = '请填写正确格式的手机号'
} }
if (!/[0-9]{6}/.test(values.veriCode)) { if (!/[0-9]{6}/.test(values.veriCode)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment