Commit eb85530f by 匡雅琴

驻店电话校验规则修改

1 parent 517bc85a
...@@ -285,7 +285,7 @@ export default { ...@@ -285,7 +285,7 @@ export default {
// }, 100) // }, 100)
// return // return
// } // }
const reg = /^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/ const reg = /^((0\d{2,3}-\d{7,8})|(1[3456789]\d{9}))$/
if (this.accountAddForm.residentPhone) { if (this.accountAddForm.residentPhone) {
const result = reg.test(this.accountAddForm.residentPhone) const result = reg.test(this.accountAddForm.residentPhone)
if (!result) { if (!result) {
......
...@@ -180,7 +180,7 @@ export default { ...@@ -180,7 +180,7 @@ export default {
} }
} }
const validatePhoneTwo = (rule, value, callback) => { const validatePhoneTwo = (rule, value, callback) => {
const reg = /^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/ const reg = /^((0\d{2,3}-\d{7,8})|(1[3456789]\d{9}))$/
if (value == '' || value == undefined || value == null) { if (value == '' || value == undefined || value == null) {
callback() callback()
} else { } else {
......
...@@ -301,7 +301,7 @@ export default { ...@@ -301,7 +301,7 @@ export default {
// }, 100) // }, 100)
// return // return
// } // }
const reg = /^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/ const reg = /^((0\d{2,3}-\d{7,8})|(1[3456789]\d{9}))$/
if (this.accountAddForm.residentPhone) { if (this.accountAddForm.residentPhone) {
const result = reg.test(this.accountAddForm.residentPhone) const result = reg.test(this.accountAddForm.residentPhone)
if (!result) { if (!result) {
......
...@@ -64,7 +64,7 @@ export default { ...@@ -64,7 +64,7 @@ export default {
}, },
data() { data() {
const validatePhoneTwo = (rule, value, callback) => { const validatePhoneTwo = (rule, value, callback) => {
const reg = /^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/ const reg = /^((0\d{2,3}-\d{7,8})|(1[3456789]\d{9}))$/
if (value == '' || value == undefined || value == null) { if (value == '' || value == undefined || value == null) {
callback() callback()
} else { } else {
...@@ -246,7 +246,7 @@ export default { ...@@ -246,7 +246,7 @@ export default {
}, },
handleSave() { handleSave() {
const params = this.infoForm const params = this.infoForm
const reg = /^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/ const reg = /^((0\d{2,3}-\d{7,8})|(1[3456789]\d{9}))$/
if (params.residentPhone) { if (params.residentPhone) {
const result = reg.test(params.residentPhone) const result = reg.test(params.residentPhone)
if (!result) { if (!result) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!