if (this.organization.login.length !== 11) { this.errors = {fieldErrors: [{field: 'login', message: '请输入正确手机号'}]}; return; }
var reg = /^[0-9]+.?[0-9]*$/; if (!reg.test(this.organization.login)) { this.errors = {fieldErrors: [{field: 'login', message: '请输入正确手机号'}]}; return; }
vue、正则校验手机号
最新推荐文章于 2024-07-03 17:20:22 发布