2、输入手机号格式不正确时 3、获取完验证码进行读秒 二、页面html <el-formclass="phone-form"ref="form":model="form"label-position="left"size="small":rules="rules"v-if="!loggingStatus"><el-form-itemprop="phoneNum":rules="rules.phoneNum"ref="phone"><el-inputsize="small"placeholder="请...
inputChange() { this.form.银行账号 = this.form.银行账号.replace(/[^d]/g, '') // 或者写成 /[^0-9]/g } </script> 2.去除空格 把获取的input框中的值的空格去掉: let text = el.currentTarget.innerText.replace(/s+/g, '') // + 表示1个或多个空格 3.去除字符串两端的空格 this.inpu...
<el-input v-model="resetForm.password" type="password" clearable placeholder="请输入密码"></el-input> </el-form-item> </el-form> //data里面得 var checkPassword = (rule, value, callback) => { if (this.isRequired) { if (value) { callback() } else { callback(new Error('请输...
<el-input v-model="dataForm.phone" /> </el-form-item> <el-form-item label="验证码:"> <el-input v-model="dataForm.code" /> <el-button type="warning" @click="sendVerificationCode" :disabled="isSendingCode || countdown > 0"> {{ countdown > 0 ? `重新发送(${countdown})` :...
VUE el-input正则验证 check(value) { let reg = /^[1-9]\d*$/; var _this = this; if (value) { if (new RegExp(reg).test(value) == false) { setTimeout(() => { _this.actionDataForm.studNum = ''; _this.errorTip = true;...
<el-input type="text" v-model.number="ruleForm.userPhone" placeholder="请输入手机号:"></el-input> </el-form-item> <el-form-item label=" 手机验证码 : "> <el-input type="text" placeholder="请输入验证码:" style="width:230px"></el-input> ...
<template><div><el-form:model="ruleForm":rules="rules"ref="ruleForm"label-width="100px"class="demo-ruleForm"><el-form-itemlabel="手机号"prop="phone"><el-inputv-model="ruleForm.phone"></el-input></el-form-item><el-form-itemlabel="身份证号"prop="idNumber"><el-inputv-model="...
1,先判断手机号和验证是否为空, 2,点击发送验证码,1分钟计时,得到验证码 3,输入的验证码是否为空和是否正确, 4,最后向服务发送请求 标签显示 <el-form-itemlabel="短信验证"prop="phoneCode"class="pr"><el-inputstyle="width:400px;"placeholder="请输入您接收的短信验证码"v-model="form.phoneCode"><...
<el-form-item prop="username"><el-input name="username" type="text" v-model="registerForm.username" placeholder="请设置登录用户名"></el-input></el-form-item> rules是一个验证规则对象,因此需要在data()页面数据里添加registerRules对象: ...
<el-form:model='form'label-width='120px'><el-form-itemlabel='手机号码:'><el-inputv-model='form.name'/></el-form-item><el-form-itemlabel='验证码:'><el-inputv-model='form.code'><template#suffix><divv-if='messageCodeVis'class='second-text'>{{countdown}}秒后重新获取</div><el...