fix: 去除多余验证
This commit is contained in:
@@ -82,7 +82,6 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
// import { host, port } from '@/components/common/js/validate'
|
// import { host, port } from '@/components/common/js/validate'
|
||||||
// import {isvalidPhone} from "../../../../store/validate";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'userBox',
|
name: 'userBox',
|
||||||
@@ -111,15 +110,6 @@ export default {
|
|||||||
callback()
|
callback()
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// const phoneVerification = (rule, value,callback) => {
|
|
||||||
// if (!value){
|
|
||||||
// callback(new Error(this.$t('validate.telephone')))
|
|
||||||
// }else if (!isvalidPhone(value)){
|
|
||||||
// callback(new Error(this.$t('validate.tel')))
|
|
||||||
// }else {
|
|
||||||
// callback()
|
|
||||||
// }
|
|
||||||
// };
|
|
||||||
return {
|
return {
|
||||||
editUser: {},
|
editUser: {},
|
||||||
url: 'sys/user',
|
url: 'sys/user',
|
||||||
@@ -144,10 +134,6 @@ export default {
|
|||||||
email: [
|
email: [
|
||||||
{ type: 'email', message: this.$t('validate.email') }
|
{ type: 'email', message: this.$t('validate.email') }
|
||||||
]
|
]
|
||||||
// mobile: [
|
|
||||||
// { validator: phoneVerification, required : true, trigger: 'blur' },
|
|
||||||
// { required: true, message: '', trigger: 'blur' }
|
|
||||||
// ]
|
|
||||||
},
|
},
|
||||||
rules2: { // 表单校验规则
|
rules2: { // 表单校验规则
|
||||||
username: [
|
username: [
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
export function isvalidPhone(str) {
|
|
||||||
const reg = /^1[3|4|5|7|8][0-9]\d{8}$/
|
|
||||||
return reg.test(str)
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user